Solved

recordset with POINT TO ACCESS 2003

Posted on 2004-09-01
2
214 Views
Last Modified: 2012-06-21
HAVE ERROR MESSAGE FROM THE FUNCTION

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

TRY TO get information from access db. do you know what's wrong?

THank you

function ValidationLoginFromPublicQuote(email,quoteid)
set rsValChk=Server.CreateObject("Adodb.RecordSet"
sqlValChk="SELECT tblQuotes.RefID, tblUsers.UserName, tblUsers.Active " &_
" FROM tblUsers INNER JOIN tblQuotes ON tblUsers.MemberID = tblQuotes.UserID " &_
" WHERE tblQuotes.RefID='"& quoteid &"' " &_
" AND tblUsers.UserName='"& email  &"'"
rsValChk.open sqlValChk,con
if not rsValChk.EOF then
      pass_login=1
else
      pass_login=0
end if
rsValChk.Close
set rsValChk=Nothing
ValidationLoginFromPublicQuote=pass_login
END FUNCTION
0
Comment
Question by:riskyricky1972
2 Comments
 
LVL 6

Expert Comment

by:Lord_McFly
ID: 11959252
I notice in the following line....

...WHERE tblQuotes.RefID='"& quoteid &"' " &_

...that you have it encapsulated with apostrophes - ' '

If this is a numerical field then you should drop the apostrophes (as this would cuase a type mismatch)...

...WHERE tblQuotes.RefID = " & quoteid & " " &_


0
 
LVL 6

Accepted Solution

by:
casstd earned 100 total points
ID: 11959371
Hi,

          here is the error message and it's very good site explain about access errors.

http://www.webthang.co.uk/tuts/tuts_asp/gk_errors/gk_errors.asp#6
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question