Tuesday, July 21, 2009

mssql

comman mistakes:
use ` ` around column names
use ' ' around values.
eg.
mySQL="SELECT * FROM USER where `NAME` ='michael'"
eg.

dim str,rsUser
str = CStr("michael")
mySQL="SELECT * FROM USER where `NAME`=' " &str & " ' "

otherwise you get unknow column name michael in where clause

No comments:

Post a Comment