Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Please help with Data type mismatch in cr
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Please help with Data type mismatch in cr

 Post Reply Post Reply
Author
288enzo View Drop Down
Groupie
Groupie
Avatar

Joined: 28 April 2003
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote 288enzo Quote  Post ReplyReply Direct Link To This Post Topic: Please help with Data type mismatch in cr
    Posted: 19 May 2003 at 6:21pm
The error tells me that the problem is in the following line:

rsCheckUser.Open strSQL, strCon

The rest is my actual code:

<%
Dim adoCon           
Dim strCon          
Dim rsCheckUser           
Dim strAccessDB      
Dim strSQL           
Dim strUserName      

strUserName = Request.Form("txtUserName")
strAccessDB = ""
Set adoCon = Server.CreateObject("ADODB.Connection")
strCon = "DRIVER={Microsoft Access Driver (*.mdb)};pwd=; DBQ=" & Server.MapPath(strAccessDB)
adoCon.Open strCon
Set rsCheckUser = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT tblUsers.Password FROM tblUsers WHERE tblUsers.UserID ='" & strUserName & "'"
rsCheckUser.Open strSQL, strCon
If NOT rsCheckUser.EOF Then
     If (Request.Form("txtUserPass")) = rsCheckUser("Password") Then
          Session("UserGood") = True
          Set adoCon = Nothing
          Set strCon = Nothing
          Set rsCheckUser = Nothing
          Response.Redirect"authorized.asp?name=" & strUserName
     End If
End If
Set adoCon = Nothing
Set strCon = Nothing
Set rsCheckUser = Nothing
Session("UserGood") = False
Response.Redirect"unauthorized.htm"
%>
Back to Top
Bliss View Drop Down
Groupie
Groupie
Avatar

Joined: 25 April 2003
Location: United States
Status: Offline
Points: 181
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bliss Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2003 at 7:15pm
What's the error?
Back to Top
288enzo View Drop Down
Groupie
Groupie
Avatar

Joined: 28 April 2003
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote 288enzo Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2003 at 7:27pm
 

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

/check_user.asp, line 16

Back to Top
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 2003 at 3:54am

in your strSQL line you have to end it with a ;

this means that your line has to be:

strSQL = "SELECT tblUsers.Password FROM tblUsers WHERE tblUsers.UserID ='" & strUserName & "';"

Greetings Chris

Using forum at Gravenrode and here and here
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.