Click here to Skip to main content
15,909,091 members
Home / Discussions / C#
   

C#

 
AnswerRe: my data is not converted into string Pin
Vikram A Punathambekar25-Jun-07 20:17
Vikram A Punathambekar25-Jun-07 20:17 
AnswerRe: my data is not converted into string Pin
inamgul25-Jun-07 20:34
inamgul25-Jun-07 20:34 
AnswerRe: my data is not converted into string Pin
I.explore.code25-Jun-07 21:02
I.explore.code25-Jun-07 21:02 
Hi, How you can store string data into an int column, i dint get it. The vice-cersa can happen but not this.

Moreover u shud alwayz make a standard to use parametrised query and not concatenate it or u will introduce a vulnerability to SQL injection attack.

parametrised query is formed like this.

SqlCommand sql_cmd = new SqlCommand("insert into Info values(@id,@name,@age)");
            sql_cmd.Parameters.Add("@id", SqlDbType.Int);
            sql_cmd.Parameters.Add("@name", SqlDbType.NVarChar);
            sql_cmd.Parameters.Add("@age", SqlDbType.Int);

            sql_cmd.Parameters["@id"].Value = int.Parse(textBox1.Text);
            sql_cmd.Parameters["@name"].Value = "Aman";
            sql_cmd.Parameters["@age"].Value = 23;

            sql_cmd.ExecuteNonQuery();


try, re-typing the column to varchar if it does not necessarily need to store int data, this should solve the problem or else try parsing your string data to int like int.parse(<string value="">);
QuestionCan't open project file after SSL enable Pin
lygine ng lee chuang25-Jun-07 20:06
lygine ng lee chuang25-Jun-07 20:06 
Questionlatch "0" and save next values to array in serialport?? Pin
Mir_As25-Jun-07 20:05
Mir_As25-Jun-07 20:05 
AnswerRe: latch "0" and save next values to array in serialport?? Pin
Vikram A Punathambekar25-Jun-07 20:19
Vikram A Punathambekar25-Jun-07 20:19 
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Mir_As25-Jun-07 20:45
Mir_As25-Jun-07 20:45 
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Vikram A Punathambekar26-Jun-07 1:30
Vikram A Punathambekar26-Jun-07 1:30 
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Mir_As26-Jun-07 2:07
Mir_As26-Jun-07 2:07 
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Vikram A Punathambekar26-Jun-07 4:31
Vikram A Punathambekar26-Jun-07 4:31 
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Mir_As26-Jun-07 5:26
Mir_As26-Jun-07 5:26 
QuestionPick up a file Pin
Hum Dum25-Jun-07 19:26
Hum Dum25-Jun-07 19:26 
AnswerRe: Pick up a file Pin
Manas Bhardwaj25-Jun-07 20:05
professionalManas Bhardwaj25-Jun-07 20:05 
AnswerRe: Pick up a file Pin
I.explore.code25-Jun-07 20:30
I.explore.code25-Jun-07 20:30 
QuestionAdding property to a control Pin
anujose25-Jun-07 18:53
anujose25-Jun-07 18:53 
AnswerRe: Adding property to a control Pin
originSH25-Jun-07 22:11
originSH25-Jun-07 22:11 
Questionhow to check the valid username and password from database? Pin
help as an alias25-Jun-07 18:22
help as an alias25-Jun-07 18:22 
AnswerRe: how to check the valid username and password from database? Pin
Manas Bhardwaj25-Jun-07 19:05
professionalManas Bhardwaj25-Jun-07 19:05 
AnswerRe: how to check the valid username and password from database? Pin
Manas Bhardwaj25-Jun-07 19:06
professionalManas Bhardwaj25-Jun-07 19:06 
QuestionRe: how to check the valid username and password from database? Pin
Vikram A Punathambekar25-Jun-07 19:53
Vikram A Punathambekar25-Jun-07 19:53 
AnswerRe: how to check the valid username and password from database? Pin
Manas Bhardwaj25-Jun-07 20:24
professionalManas Bhardwaj25-Jun-07 20:24 
GeneralRe: how to check the valid username and password from database? Pin
Brady Kelly25-Jun-07 21:06
Brady Kelly25-Jun-07 21:06 
GeneralRe: how to check the valid username and password from database? Pin
Vasudevan Deepak Kumar25-Jun-07 21:50
Vasudevan Deepak Kumar25-Jun-07 21:50 
GeneralRe: how to check the valid username and password from database? Pin
help as an alias25-Jun-07 21:00
help as an alias25-Jun-07 21:00 
QuestionUsing Delegates To Communicate Pin
DavidNelson25-Jun-07 17:58
DavidNelson25-Jun-07 17:58 

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.