S****n 发帖数: 46 | 1 I tried to do
"SELECT * FROM user WHERE made_time > " + login
in ASP. login is a variant, do I need single quote?
Error message:
Microsoft][ODBC Microsoft Access Driver] Data type mismatch in
criteria expression.
What's wrong? |
w*****h 发帖数: 139 | 2 What's the data type of your made_time? Andwhat's the format
of "login"? They have to be consistent.
【在 S****n 的大作中提到】 : I tried to do : "SELECT * FROM user WHERE made_time > " + login : in ASP. login is a variant, do I need single quote? : Error message: : Microsoft][ODBC Microsoft Access Driver] Data type mismatch in : criteria expression. : What's wrong?
|
i**s 发帖数: 97 | 3 Use cdate() change login to data type
【在 S****n 的大作中提到】 : I tried to do : "SELECT * FROM user WHERE made_time > " + login : in ASP. login is a variant, do I need single quote? : Error message: : Microsoft][ODBC Microsoft Access Driver] Data type mismatch in : criteria expression. : What's wrong?
|
w*********n 发帖数: 84 | 4 Or, simply use SYSDate instead of 'login'.
I think it can also works.
【在 S****n 的大作中提到】 : I tried to do : "SELECT * FROM user WHERE made_time > " + login : in ASP. login is a variant, do I need single quote? : Error message: : Microsoft][ODBC Microsoft Access Driver] Data type mismatch in : criteria expression. : What's wrong?
|
b****e 发帖数: 1275 | 5 if login is a date variable that is specified by user at
runtime.. you should make sure you add ' ' around login
in the variable itself.. then construct your sql.
【在 w*********n 的大作中提到】 : Or, simply use SYSDate instead of 'login'. : I think it can also works.
|