Access Database Error (ASP) 
Author Message
 Access Database Error (ASP)

Hi,
    I'm developing a "members only" area to my website using ASP. The user
enters their ID and password into a form and then submits it. The following
code is meant to look up the ID and password entered in an Access database
(table: Access).

<%
ID = Request.Form("ID")
Password = Request.Form("Password")

Set dConnCheckID = Server.Createobject("ADODB.Connection")
Set CmdCheckID = Server.Createobject("ADODB.Recordset")

dConnCheckID.Open "Driver={Microsoft Access Driver (*.mdb)};
DBQ=C:\Inetpub\wwwroot\database\passwords.mdb; Password=I'm not telling you
that...!"

SQL = "Select * From Access Where (ID = '" & ID & "') And (Password = '" &
Password & "')"
%>

    However, I get the following error code. Any ideas?

"Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria
expression.
/form.asp, line 26"

TIA,

Paul Smith



Mon, 20 May 2002 03:00:00 GMT  
 Access Database Error (ASP)
Hi,
    I'm developing a "members only" area to my website using ASP. The
user
enters their ID and password into a form and then submits it. The
following
code is meant to look up the ID and password entered in an Access
database
(table: Access).

<%
ID = Request.Form("ID")
Password = Request.Form("Password")

Set dConnCheckID = Server.Createobject("ADODB.Connection")
Set CmdCheckID = Server.Createobject("ADODB.Recordset")

dConnCheckID.Open "Driver={Microsoft Access Driver (*.mdb)};
DBQ=C:\Inetpub\wwwroot\database\passwords.mdb; Password=I'm not telling
you
that...!"

SQL = "Select * From Access Where (ID = '" & ID & "') And (Password = '"
&
Password & "')"
%>

    However, I get the following error code. Any ideas?

"Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria
expression.
/form.asp, line 26"

TIA,

Paul Smith



Mon, 20 May 2002 03:00:00 GMT  
 Access Database Error (ASP)
Have you checked the data type of ID and Password?
I think the problem is from ID. If the data type of ID is integer, no
single-quote is needed.
SQL="Select * From Access Where (ID=" & ID & ") And (Password='" & Password
& "')"
Please try


Quote:
> Hi,
>     I'm developing a "members only" area to my website using ASP. The
> user
> enters their ID and password into a form and then submits it. The
> following
> code is meant to look up the ID and password entered in an Access
> database
> (table: Access).

> <%
> ID = Request.Form("ID")
> Password = Request.Form("Password")

> Set dConnCheckID = Server.Createobject("ADODB.Connection")
> Set CmdCheckID = Server.Createobject("ADODB.Recordset")

> dConnCheckID.Open "Driver={Microsoft Access Driver (*.mdb)};
> DBQ=C:\Inetpub\wwwroot\database\passwords.mdb; Password=I'm not telling
> you
> that...!"

> SQL = "Select * From Access Where (ID = '" & ID & "') And (Password = '"
> &
> Password & "')"
> %>

>     However, I get the following error code. Any ideas?

> "Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
> [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria
> expression.
> /form.asp, line 26"

> TIA,

> Paul Smith




Mon, 27 May 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. error doing a FILTER on an Access database via Asp/VBScript and ADO

2. Weird ASP error when trying to add a new record to a MS Access database

3. error doing a FILTER on an Access database via Asp/VBScript and ADO

4. asp to access database error...

5. ASP Error with Access database

6. Need help with ASP to access my Access Database

7. Database access error

8. VBScript Error due to converting databases from Access to SQL Server 6.5

9. Error Message when querying Access database

10. no permission to view access database via asp(using ado)

11. PROBLEM: Accessing database through Java-class in ASP (Jscript)

12. Using JScript to access database in ASP

 

 
Powered by phpBB® Forum Software