navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Update problems

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Update problems
Page: [1]
 
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

(in reply to Adz)
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

(in reply to Adz)
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?


(in reply to Adz)
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

(in reply to Adz)
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

(in reply to Adz)
Adz

 

Posts: 17
Joined: 1/3/2002
From: United Kingdom
Status: offline

 
RE: Update problems - 3/5/2002 3:19:47   
Well I've but in that bit of code and it brought back this responce :

SELECT ddsheet.* FROM ddsheet WHERE ((DateValue(ddsheet.daterequested)=#22/02/2002#) AND ((ddsheet.instructiontype)='ddrefund'))

Which looks to me OK, varType is a text field within the database so it should be OK and varDate is a Date field, so where's the problem?!

My hair's falling out quickly on this one.


(in reply to Adz)
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

(in reply to Adz)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Update problems
Page: [1]
Jump to: 1





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