Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

recordset with POINT TO ACCESS 2003

Posted on 2004-09-01
2
Medium Priority
?
219 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 400 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

636 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