OLEDB connection to mysql via ASP
OLEDB connection to mysql via ASP
am 20.04.2005 12:25:26 von Trym Bagger
Hello all:
Although the following question is not related to a MS flavor database, it
IS related to MS flavored technologies / platforms: ASP and Windows XP. So
please bear with me.
I have just installed MySQL via the new windows installer program on my
Windows XP Pro machine, and everything works perfectly. Now I would like to
make a connection from an ASP page to the database (locally on my computer)
The connection string which I use on my mysql database on my web site
(externally) is
<%
set Conn = server.CreateObject("ADODB.connection")
Conn.open "Provider=MySQLProv;Location=mysql.myweb.com;Data Source=db;User
Id=myname;Password=mypw;"
%>
and that works perfectly.
Now I would like to use the same string for local connections on my PC.
I have tried:
<%
set Conn = server.CreateObject("ADODB.connection")
Conn.open "Provider=MySQLProv;Location=localhost;Data Source=localhost;User
Id=root;Password=pw;"
%>
But I get the following error message:
ADODB.Connection (0x800A0E7A)
Provider cannot be found. It may not be properly installed.
That leads to several questions:
- Are the "Location" and "Data source" arguments correct? (I did not specify
anything particular when installation windows package, the user "root" was
automatically created.
- Do I have to install something extra in order to make MySQLProv work
locally on my computer? (Ssomehow the error message seems to indicate that )
Are there any alternatives to MySQLProv (I prefer OLEDB, not OBDC) - already
natively available on win XP Pro which would work?
Thanks a lot!
TB
RE: OLEDB connection to mysql via ASP
am 20.04.2005 15:00:02 von JohnBeschler
You will need to install the ODBC driver for MySQL. A quick search this
morning at www.mysql.com did not reveal any OLEDB drivers; however, they do
have an ODBC driver here: http://www.mysql.com/products/connector/odbc/
"TB" wrote:
> Hello all:
>
> Although the following question is not related to a MS flavor database, it
> IS related to MS flavored technologies / platforms: ASP and Windows XP. So
> please bear with me.
>
> I have just installed MySQL via the new windows installer program on my
> Windows XP Pro machine, and everything works perfectly. Now I would like to
> make a connection from an ASP page to the database (locally on my computer)
>
> The connection string which I use on my mysql database on my web site
> (externally) is
>
> <%
> set Conn = server.CreateObject("ADODB.connection")
> Conn.open "Provider=MySQLProv;Location=mysql.myweb.com;Data Source=db;User
> Id=myname;Password=mypw;"
> %>
>
> and that works perfectly.
>
> Now I would like to use the same string for local connections on my PC.
>
> I have tried:
>
> <%
> set Conn = server.CreateObject("ADODB.connection")
> Conn.open "Provider=MySQLProv;Location=localhost;Data Source=localhost;User
> Id=root;Password=pw;"
> %>
>
> But I get the following error message:
>
> ADODB.Connection (0x800A0E7A)
> Provider cannot be found. It may not be properly installed.
>
> That leads to several questions:
>
> - Are the "Location" and "Data source" arguments correct? (I did not specify
> anything particular when installation windows package, the user "root" was
> automatically created.
>
> - Do I have to install something extra in order to make MySQLProv work
> locally on my computer? (Ssomehow the error message seems to indicate that )
>
> Are there any alternatives to MySQLProv (I prefer OLEDB, not OBDC) - already
> natively available on win XP Pro which would work?
>
> Thanks a lot!
>
> TB
>
>
>
>
Re: OLEDB connection to mysql via ASP
am 21.04.2005 00:08:21 von Trym Bagger
Yes, now it works with the ODBC driver. What I don't understand is why my
web hosting provider can have an OLEDB driver on the web server (Windows
2003 server), but not me.
TB
"John Beschler" wrote in message
news:B452A161-39E1-4F0D-9067-205D53B47D5B@microsoft.com...
> You will need to install the ODBC driver for MySQL. A quick search this
> morning at www.mysql.com did not reveal any OLEDB drivers; however, they
> do
> have an ODBC driver here: http://www.mysql.com/products/connector/odbc/
>
> "TB" wrote:
>
>> Hello all:
>>
>> Although the following question is not related to a MS flavor database,
>> it
>> IS related to MS flavored technologies / platforms: ASP and Windows XP.
>> So
>> please bear with me.
>>
>> I have just installed MySQL via the new windows installer program on my
>> Windows XP Pro machine, and everything works perfectly. Now I would like
>> to
>> make a connection from an ASP page to the database (locally on my
>> computer)
>>
>> The connection string which I use on my mysql database on my web site
>> (externally) is
>>
>> <%
>> set Conn = server.CreateObject("ADODB.connection")
>> Conn.open "Provider=MySQLProv;Location=mysql.myweb.com;Data
>> Source=db;User
>> Id=myname;Password=mypw;"
>> %>
>>
>> and that works perfectly.
>>
>> Now I would like to use the same string for local connections on my PC.
>>
>> I have tried:
>>
>> <%
>> set Conn = server.CreateObject("ADODB.connection")
>> Conn.open "Provider=MySQLProv;Location=localhost;Data
>> Source=localhost;User
>> Id=root;Password=pw;"
>> %>
>>
>> But I get the following error message:
>>
>> ADODB.Connection (0x800A0E7A)
>> Provider cannot be found. It may not be properly installed.
>>
>> That leads to several questions:
>>
>> - Are the "Location" and "Data source" arguments correct? (I did not
>> specify
>> anything particular when installation windows package, the user "root"
>> was
>> automatically created.
>>
>> - Do I have to install something extra in order to make MySQLProv work
>> locally on my computer? (Ssomehow the error message seems to indicate
>> that )
>>
>> Are there any alternatives to MySQLProv (I prefer OLEDB, not OBDC) -
>> already
>> natively available on win XP Pro which would work?
>>
>> Thanks a lot!
>>
>> TB
>>
>>
>>
>>
Re: OLEDB connection to mysql via ASP
am 21.04.2005 06:37:06 von JohnBeschler
How do you know the provider is using OLEDB?
There was a version of the OLEDB driver for mysql at one time; however, I'm
not sure where I saw it.
"TB" wrote:
> Yes, now it works with the ODBC driver. What I don't understand is why my
> web hosting provider can have an OLEDB driver on the web server (Windows
> 2003 server), but not me.
>
> TB
>
> "John Beschler" wrote in message
> news:B452A161-39E1-4F0D-9067-205D53B47D5B@microsoft.com...
> > You will need to install the ODBC driver for MySQL. A quick search this
> > morning at www.mysql.com did not reveal any OLEDB drivers; however, they
> > do
> > have an ODBC driver here: http://www.mysql.com/products/connector/odbc/
> >
> > "TB" wrote:
> >
> >> Hello all:
> >>
> >> Although the following question is not related to a MS flavor database,
> >> it
> >> IS related to MS flavored technologies / platforms: ASP and Windows XP.
> >> So
> >> please bear with me.
> >>
> >> I have just installed MySQL via the new windows installer program on my
> >> Windows XP Pro machine, and everything works perfectly. Now I would like
> >> to
> >> make a connection from an ASP page to the database (locally on my
> >> computer)
> >>
> >> The connection string which I use on my mysql database on my web site
> >> (externally) is
> >>
> >> <%
> >> set Conn = server.CreateObject("ADODB.connection")
> >> Conn.open "Provider=MySQLProv;Location=mysql.myweb.com;Data
> >> Source=db;User
> >> Id=myname;Password=mypw;"
> >> %>
> >>
> >> and that works perfectly.
> >>
> >> Now I would like to use the same string for local connections on my PC.
> >>
> >> I have tried:
> >>
> >> <%
> >> set Conn = server.CreateObject("ADODB.connection")
> >> Conn.open "Provider=MySQLProv;Location=localhost;Data
> >> Source=localhost;User
> >> Id=root;Password=pw;"
> >> %>
> >>
> >> But I get the following error message:
> >>
> >> ADODB.Connection (0x800A0E7A)
> >> Provider cannot be found. It may not be properly installed.
> >>
> >> That leads to several questions:
> >>
> >> - Are the "Location" and "Data source" arguments correct? (I did not
> >> specify
> >> anything particular when installation windows package, the user "root"
> >> was
> >> automatically created.
> >>
> >> - Do I have to install something extra in order to make MySQLProv work
> >> locally on my computer? (Ssomehow the error message seems to indicate
> >> that )
> >>
> >> Are there any alternatives to MySQLProv (I prefer OLEDB, not OBDC) -
> >> already
> >> natively available on win XP Pro which would work?
> >>
> >> Thanks a lot!
> >>
> >> TB
> >>
> >>
> >>
> >>
>
>
>