Solved

recordset with POINT TO ACCESS 2003

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

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…
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/…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

688 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