Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shifis
Posting Yak Master
157 Posts |
Posted - 2006-06-12 : 20:26:44
|
| I have a where dinamic and I need to send the next line from VB6.0, but I got the next error:whereString = "' where tbEmpleado.noTarjeta = ' + char(39) + '" & noTarjeta & "' + char(39) + ' '"Error:Run-time error :'-2147217900(80040e14)'Incorrect syntax near '+' |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2006-06-12 : 20:32:01
|
| Use parameters. Never concatenate SQL strings together with input and execute them. |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-06-12 : 22:24:34
|
| you got confused in the string delimiter, in vb, use double quote, in sql single quote, assuming noTarjeta is a variable in vb" where tbEmpleado.noTarjeta='" & noTarjeta & "'"HTH--------------------keeping it simple... |
 |
|
|
|
|
|