Click here to Skip to main content
15,902,447 members
Home / Discussions / C#
   

C#

 
AnswerRe: SQL Error converting data type varchar to numeric Pin
Rob Philpott5-Nov-07 5:53
Rob Philpott5-Nov-07 5:53 
Hey Haluk,

Some 'hints'. If you are inserting a value into an integer column, you shouldn't put in in quotes:

insert into MyTable(Col1) values ('1')

should be just:

insert into MyTable(Col1) values (1)


So make sure that you don't parenthesize integers.

Try to break that huge insert statement into something more readable - ideally a parameterised stored procedure where you can add the parameters one by one. If you don't want to do that then try StringBuilder to String.Format to make it more readable.

One last thing - it look like you're escaping single quotes (\'). You don't need to do this. You only need to escape double quotes (\")

Hope that helps.

Regards,
Rob Philpott.

GeneralRe: SQL Error converting data type varchar to numeric Pin
ortaparmak5-Nov-07 7:13
ortaparmak5-Nov-07 7:13 
AnswerRe: SQL Error converting data type varchar to numeric Pin
snorkie5-Nov-07 5:56
professionalsnorkie5-Nov-07 5:56 
GeneralRe: SQL Error converting data type varchar to numeric Pin
ortaparmak5-Nov-07 7:06
ortaparmak5-Nov-07 7:06 
GeneralRe: SQL Error converting data type varchar to numeric Pin
snorkie5-Nov-07 7:12
professionalsnorkie5-Nov-07 7:12 
GeneralRe: SQL Error converting data type varchar to numeric Pin
ortaparmak5-Nov-07 7:41
ortaparmak5-Nov-07 7:41 
GeneralRe: SQL Error converting data type varchar to numeric Pin
snorkie6-Nov-07 5:13
professionalsnorkie6-Nov-07 5:13 
AnswerRe: SQL Error converting data type varchar to numeric Pin
Pete O'Hanlon5-Nov-07 9:38
mvePete O'Hanlon5-Nov-07 9:38 
GeneralRe: SQL Error converting data type varchar to numeric Pin
ortaparmak5-Nov-07 11:41
ortaparmak5-Nov-07 11:41 
QuestionIs Regex faster? Pin
error14085-Nov-07 5:24
error14085-Nov-07 5:24 
AnswerRe: Is Regex faster? Pin
Ilya Verbitskiy5-Nov-07 5:29
Ilya Verbitskiy5-Nov-07 5:29 
AnswerRe: Is Regex faster? Pin
Colin Angus Mackay5-Nov-07 5:30
Colin Angus Mackay5-Nov-07 5:30 
AnswerRe: Is Regex faster? Pin
DavidNohejl5-Nov-07 5:48
DavidNohejl5-Nov-07 5:48 
AnswerRe: Is Regex faster? Pin
Pete O'Hanlon5-Nov-07 9:28
mvePete O'Hanlon5-Nov-07 9:28 
GeneralRe: Is Regex faster? Pin
error14085-Nov-07 21:53
error14085-Nov-07 21:53 
GeneralRe: Is Regex faster? Pin
Pete O'Hanlon5-Nov-07 23:16
mvePete O'Hanlon5-Nov-07 23:16 
QuestionWeb Service Client / Using Non-Passed In Parameters Pin
Jeremy A. Cunningham ~ AltTech5-Nov-07 5:18
Jeremy A. Cunningham ~ AltTech5-Nov-07 5:18 
AnswerRe: Web Service Client / Using Non-Passed In Parameters Pin
RedPhoenix.net5-Nov-07 6:31
RedPhoenix.net5-Nov-07 6:31 
GeneralRe: Web Service Client / Using Non-Passed In Parameters Pin
Jeremy A. Cunningham ~ AltTech5-Nov-07 6:40
Jeremy A. Cunningham ~ AltTech5-Nov-07 6:40 
AnswerRe: Web Service Client / Using Non-Passed In Parameters Pin
Ennis Ray Lynch, Jr.5-Nov-07 10:00
Ennis Ray Lynch, Jr.5-Nov-07 10:00 
GeneralRe: Web Service Client / Using Non-Passed In Parameters Pin
Jeremy A. Cunningham ~ AltTech6-Nov-07 4:47
Jeremy A. Cunningham ~ AltTech6-Nov-07 4:47 
GeneralRe: Web Service Client / Using Non-Passed In Parameters Pin
Ennis Ray Lynch, Jr.6-Nov-07 4:58
Ennis Ray Lynch, Jr.6-Nov-07 4:58 
GeneralRe: Web Service Client / Using Non-Passed In Parameters Pin
Jeremy A. Cunningham ~ AltTech8-Nov-07 1:58
Jeremy A. Cunningham ~ AltTech8-Nov-07 1:58 
GeneralRe: Web Service Client / Using Non-Passed In Parameters Pin
Ennis Ray Lynch, Jr.8-Nov-07 3:15
Ennis Ray Lynch, Jr.8-Nov-07 3:15 
QuestionN-Grandparent-Parent-Child Algorithm Pin
VarChar2555-Nov-07 5:08
VarChar2555-Nov-07 5:08 

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.