Click here to Skip to main content
15,892,809 members
Home / Discussions / C#
   

C#

 
GeneralRe: Using of C# to do print,merge pdf Pin
Christian Graus11-Jun-09 14:48
protectorChristian Graus11-Jun-09 14:48 
GeneralRe: Using of C# to do print,merge pdf Pin
daffy_200311-Jun-09 14:55
daffy_200311-Jun-09 14:55 
GeneralRe: Using of C# to do print,merge pdf Pin
Christian Graus11-Jun-09 14:56
protectorChristian Graus11-Jun-09 14:56 
QuestionWhat do you think of this? Multithreaded remote registry handler Pin
jackgeek11-Jun-09 12:02
jackgeek11-Jun-09 12:02 
AnswerRe: What do you think of this? Multithreaded remote registry handler Pin
jackgeek11-Jun-09 12:04
jackgeek11-Jun-09 12:04 
AnswerRe: What do you think of this? Multithreaded remote registry handler Pin
harold aptroot11-Jun-09 12:09
harold aptroot11-Jun-09 12:09 
Questioncannot insert into database 2005 using visual c# 2008 Pin
Adekolurejo11-Jun-09 11:33
Adekolurejo11-Jun-09 11:33 
AnswerRe: cannot insert into database 2005 using visual c# 2008 Pin
Colin Angus Mackay11-Jun-09 12:24
Colin Angus Mackay11-Jun-09 12:24 
Adekolurejo wrote:
How do I get the value from textbox before it can be inserted into batabase.


To get the value in the TextBox you use something like this (assuming your TextBox is called myTextBox)
myStringValue = myTextBox.Text;


Your SQL needs a little bit of work too. Try this:
SqlCommand myCommand= new SqlCommand("INSERT INTO table (Column1, Column2) " +
"Values (@firstParam, @secondParam)", myConnection);
myCommand.Parameters.AddWithValue("@firstParam", myStringValue);
myCommadn.Parameters.AddWithValue("@secondParam", myIntValue);
myCommand.ExecuteNonQuery();


The use of parameters means that you are not dangerously concatenating strings which can lead to SQL Injection Attacks.

Man who stand on hill with mouth open wait long time for roast duck to drop in

QuestionRe: cannot insert into database 2005 using visual c# 2008 Pin
Adekolurejo11-Jun-09 12:42
Adekolurejo11-Jun-09 12:42 
AnswerRe: cannot insert into database 2005 using visual c# 2008 Pin
Colin Angus Mackay11-Jun-09 13:08
Colin Angus Mackay11-Jun-09 13:08 
GeneralRe: cannot insert into database 2005 using visual c# 2008 Pin
Adekolurejo11-Jun-09 13:20
Adekolurejo11-Jun-09 13:20 
Questionwhat is the difference between Dictionary<> and SortedList<> Pin
Seraph_summer11-Jun-09 10:26
Seraph_summer11-Jun-09 10:26 
AnswerRe: what is the difference between Dictionary<> and SortedList<> Pin
Abhijit Jana11-Jun-09 10:33
professionalAbhijit Jana11-Jun-09 10:33 
AnswerRe: what is the difference between Dictionary<> and SortedList<> Pin
Luc Pattyn11-Jun-09 10:36
sitebuilderLuc Pattyn11-Jun-09 10:36 
GeneralRe: what is the difference between Dictionary<> and SortedList<> Pin
led mike11-Jun-09 10:43
led mike11-Jun-09 10:43 
QuestionRichTextBoxStreamType.PlainText Does not work. Pin
Baeltazor11-Jun-09 10:11
Baeltazor11-Jun-09 10:11 
AnswerRe: RichTextBoxStreamType.PlainText Does not work. Pin
Baeltazor11-Jun-09 11:02
Baeltazor11-Jun-09 11:02 
QuestionHow to disable JavaScript in webControl hosted in a WinForm Pin
kozu11-Jun-09 10:06
kozu11-Jun-09 10:06 
AnswerRe: How to disable JavaScript in webControl hosted in a WinForm Pin
kozu11-Jun-09 10:25
kozu11-Jun-09 10:25 
GeneralRe: How to disable JavaScript in webControl hosted in a WinForm Pin
kozu11-Jun-09 13:32
kozu11-Jun-09 13:32 
QuestionText formatting Pin
Skymir11-Jun-09 9:26
Skymir11-Jun-09 9:26 
AnswerRe: Text formatting Pin
OriginalGriff11-Jun-09 10:33
mveOriginalGriff11-Jun-09 10:33 
GeneralRe: Text formatting Pin
Skymir11-Jun-09 10:46
Skymir11-Jun-09 10:46 
GeneralRe: Text formatting Pin
OriginalGriff11-Jun-09 10:55
mveOriginalGriff11-Jun-09 10:55 
GeneralRe: Text formatting Pin
Skymir11-Jun-09 11:02
Skymir11-Jun-09 11:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.