Solved

recordset with POINT TO ACCESS 2003

Posted on 2004-09-01
2
216 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 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 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