MySQL Forums
Forum List  »  Connector/ODBC

conn.Open / MySQL / ODBC Drivers (0x80040E21)
Posted by: Luca Angelo
Date: July 03, 2006 03:13AM

Hiya everone, I'm trying to make a connection between an ASP page and MySQL, but there're many problems...

I've installed MySQLConnector v.3.51 and v.2.50, but I'm using the lastest one release, then I made the connections as :
DSN sql_conn
driver MySQL
Host 127.0.0.1
Dbname utenti
User root
Pass xxxxxx
I made the virtual directory in IIS called 'mysql_registration'

VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Connection string (Connections/db_conn.asp) in :

<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim db_conn
db_conn = "Driver={MySQL}; Server=localhost; db=utenti; Uid=root; pwd=xxxxxx"
%>

(I tried to modify the connection string as "Driver={MySQL ODBC 3.51 Driver}; Server=localhost; db=utenti; Uid=root; pwd=xxxxxx" or by type the driver name in "Driver={sql_conn}; Server=localhost; db=utenti; Uid=root; pwd=xxxxxx")

everything seemed to be OK, but...ERROR LINE 38

• Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC driver does not support the requested properties.
/mysql_registration/registra.asp, line 38

• Browser:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
• Pagina:
POST 49 bytes to /mysql_registration/registra.asp
• POST Data:
login=as&codice=as&mail=as&Submit=Registra+Utente

VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
The code included in the mail file "registra.asp" :
<!--#include file="Connections/db_conn.asp"-->
<%
if Request.TotalBytes>0 then
dim strLogin
strLogin = request.form("login")
strLogin = trim(strLogin)
dim strCode
strCode = request.form("codice")
strCode = trim(strCode)
dim strMail
strMail = request.form("mail")
strMail = trim(strMail)
dim intValido
intValido = 0
if(strMail<>"")AND(strCode<>"")AND(strLogin<>"")then
Dim Conn
Dim Comm
Dim Rs
'Verifico che non vi sia gi utente
Set conn = Server.CreateObject("ADODB.Connection")
Set comm = Server.CreateObject("ADODB.Command")
Set Rs = Server.CreateObject("ADODB.Recordset")
conn.CommandTimeout = 40
conn.CursorLocation = 1
conn.ConnectionString = db_conn
conn.Open
comm.ActiveConnection = conn
comm.CommandType = 1
comm.CommandText = "select id_user from utenti where login='"&strLogin&"'"
Rs.Open comm,,1,1 'LINE 38 !!! ERROR !!!

Options: ReplyQuote


Subject
Written By
Posted
conn.Open / MySQL / ODBC Drivers (0x80040E21)
July 03, 2006 03:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.