Problem connecting to MySQL in IIS through ASP/VB

Hi,

I've been having problems trying to connect to MySQL through IIS via
ODBC in ASP.NET (using VB). When I run the code in Visual Studio it
works fine -- i.e. I'm able to enter data into the MySQL table. But
running it under IIS it just won't work - no error messages, but with a
few message boxes I found that it seems to halt at the Open method,
i.e.

Dim conn As New OdbcConnection(connStr)
conn.Open()

In a separate aspx file IIS allows me to read data from the database
using

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ connectionStrings:dConnect %>" ProviderName="<%$
connectionStrings:dConnect.ProviderName %>" SelectCommand="SELECT *
FROM users" />

But the problem for me is how to connect to the database in my separate
VB file. Maybe a permissions issue? I'd be very grateful for any
advice.

Cheers,

Alan
Alan [ Mo, 07 August 2006 13:03 ] [ ID #1420898 ]

Re: Problem connecting to MySQL in IIS through ASP/VB

"Alan" <Alan.Littlewood [at] gmail.com> wrote in message
news:1154948626.816459.38110 [at] 75g2000cwc.googlegroups.com...
> Hi,
>
> I've been having problems trying to connect to MySQL through IIS via
> ODBC in ASP.NET (using VB). When I run the code in Visual Studio it
> works fine -- i.e. I'm able to enter data into the MySQL table. But
> running it under IIS it just won't work - no error messages, but with a
> few message boxes I found that it seems to halt at the Open method,
> i.e.
>
> Dim conn As New OdbcConnection(connStr)
> conn.Open()
>
> In a separate aspx file IIS allows me to read data from the database
> using
>
> <asp:SqlDataSource ID="SqlDataSource1" runat="server"
> ConnectionString="<%$ connectionStrings:dConnect %>" ProviderName="<%$
> connectionStrings:dConnect.ProviderName %>" SelectCommand="SELECT *
> FROM users" />
>
> But the problem for me is how to connect to the database in my separate
> VB file. Maybe a permissions issue? I'd be very grateful for any
> advice.
>

This group is for Classic ASP.

Try asking in:-

microsoft.public.dotnet.framework.odbcnet


> Cheers,
>
> Alan
>
Anthony Jones [ Mo, 07 August 2006 13:44 ] [ ID #1420899 ]

Re: Problem connecting to MySQL in IIS through ASP/VB

Oops! Sorry about that, will try the other group.
A

Anthony Jones wrote:

> "Alan" <Alan.Littlewood [at] gmail.com> wrote in message
> news:1154948626.816459.38110 [at] 75g2000cwc.googlegroups.com...
> > Hi,
> >
> > I've been having problems trying to connect to MySQL through IIS via
> > ODBC in ASP.NET (using VB). When I run the code in Visual Studio it
> > works fine -- i.e. I'm able to enter data into the MySQL table. But
> > running it under IIS it just won't work - no error messages, but with a
> > few message boxes I found that it seems to halt at the Open method,
> > i.e.
> >
> > Dim conn As New OdbcConnection(connStr)
> > conn.Open()
> >
> > In a separate aspx file IIS allows me to read data from the database
> > using
> >
> > <asp:SqlDataSource ID="SqlDataSource1" runat="server"
> > ConnectionString="<%$ connectionStrings:dConnect %>" ProviderName="<%$
> > connectionStrings:dConnect.ProviderName %>" SelectCommand="SELECT *
> > FROM users" />
> >
> > But the problem for me is how to connect to the database in my separate
> > VB file. Maybe a permissions issue? I'd be very grateful for any
> > advice.
> >
>
> This group is for Classic ASP.
>
> Try asking in:-
>
> microsoft.public.dotnet.framework.odbcnet
>
>
> > Cheers,
> >
> > Alan
> >
Alan [ Mo, 07 August 2006 13:54 ] [ ID #1420900 ]
Webserver » microsoft.public.inetserver.asp.db » Problem connecting to MySQL in IIS through ASP/VB

Vorheriges Thema: Pattern Matching
Nächstes Thema: ASP website validating against Active Directory?