Solved

recordset with POINT TO ACCESS 2003

Posted on 2004-09-01
2
212 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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now