|
| |
|
|
Adz
Posts: 17 Joined: 1/3/2002 From: United Kingdom Status: offline
|
Update problems - 3/1/2002 4:51:35
HELP I've have this update page which uses radio buttons to update an Access db. All of them work except for one which brings up the following error message when used : Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. /New/forms/directdebit/status2.asp, line 196 The code this relates to is : strSQL = "" strSQL = strSQL & "SELECT ddsheet.* FROM ddsheet WHERE ((DateValue(ddsheet.daterequested)='" & DateValue(varDate) & "') AND ((ddsheet.instructiontype)='" & varType & "'))" objRs.Open strSQL, objConn , 2, 3 objRs.MoveLast objRs.MoveFirst I've checked everthing and I've run out of ideas, can anybody help. Adz
|
|
|
|
William Lee
Posts: 1179 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: Update problems - 3/1/2002 8:54:19
You're using MS Access so wrap the Date type variable with # instead of single quote. William Lee
|
|
|
|
William Lee
Posts: 1179 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: Update problems - 3/2/2002 11:11:50
Try .... WHERE ((DateValue(ddsheet.daterequested)=#" & DateValue(varDate) & "#) AND ... William Lee
|
|
|
|
Adz
Posts: 17 Joined: 1/3/2002 From: United Kingdom Status: offline
|
RE: Update problems - 3/4/2002 11:47:24
Thanks for that William, but I've tried that and still the same thing happens. I've tried using a drop-down list instead of radio buttons and the same thing happens, all of the other options work except for one. Any other ideas?
|
|
|
|
William Lee
Posts: 1179 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: Update problems - 3/4/2002 12:51:21
What is data type is varType? William Lee
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Update problems - 3/4/2002 14:37:18
Can you also do : ...... Response.write strSQL response.end objRs.Open strSQL, objConn , 2, 3 ........ Then we can see the data that errors §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
William Lee
Posts: 1179 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: Update problems - 3/5/2002 3:26:30
Try remove DateValue function from varDate, since it is already a date type. Try this, I've got no other ideas. William Lee
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|