Simple ASP DB problem.

Simple ASP DB problem.

am 15.01.2008 16:15:55 von Des

I am trying to connect to a MySQL database on a windows server using
ASP / ADODB

I keep getting unable to display page

http://www.desmond-otoole.co.uk/index.asp

Any sugestions?

Re: Simple ASP DB problem.

am 15.01.2008 16:27:03 von reb01501

Des wrote:
> I am trying to connect to a MySQL database on a windows server using
> ASP / ADODB
>
> I keep getting unable to display page
>
> http://www.desmond-otoole.co.uk/index.asp
>
Not without seeing the code used to connect, as well as the acutal error
message ... do you have "friendly errors" shut off so you you can see
the actual errors in your browser?
http://www.aspfaq.com/show.asp?id=2109

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: Simple ASP DB problem.

am 15.01.2008 18:43:26 von Des

On 15 Jan, 15:27, "Bob Barrows [MVP]"
wrote:
> Des wrote:
> > I am trying to connect to a MySQL database on a windows server using
> > ASP / ADODB
>
> > I keep getting unable to display page
>
> >http://www.desmond-otoole.co.uk/index.asp
>
> Not without seeing the code used to connect, as well as the acutal error
> message ... do you have "friendly errors" shut off so you you can see
> the actual errors in your browser?http://www.aspfaq.com/show.asp?id=2109
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.

------------------
Hear is the entire code for the page. This is a MYSQL database

<%@ Language=VBScript %>

<%
Set connection = Server.CreateObject("ADODB.Connection")
Set rsResult = Server.CreateObject("ADODB.Recordset")

sqlconn =
"Driver={mySQL};Server=mysql12.streamline.net;Database=desmo ndot;Uid=desmondot;Pwd=s131679"
connection.Open sqlconn

sqlResults = "SELECT * FROM Members"

rsResult.Open sqlResults, connection
rsResult.MoveFirst
sName = rsResult("f_name")

echo sName
%>

Re: Simple ASP DB problem.

am 15.01.2008 19:06:46 von reb01501

Des wrote:
> On 15 Jan, 15:27, "Bob Barrows [MVP]"
> wrote:
>> Des wrote:
>>> I am trying to connect to a MySQL database on a windows server using
>>> ASP / ADODB
>>
>>> I keep getting unable to display page
>>
>>> http://www.desmond-otoole.co.uk/index.asp
>>
>> Not without seeing the code used to connect, as well as the acutal
>> error message ... do you have "friendly errors" shut off so you you
>> can see the actual errors in your
>> browser?http://www.aspfaq.com/show.asp?id=2109
>>
>
> ------------------
> Hear is the entire code for the page. This is a MYSQL database
>
> <%@ Language=VBScript %>
>
> <%
> Set connection = Server.CreateObject("ADODB.Connection")
> Set rsResult = Server.CreateObject("ADODB.Recordset")
>
> sqlconn =
>
"Driver={mySQL};Server=mysql12.streamline.net;Database=desmo ndot;Uid=des
mondot;Pwd=s131679"
> connection.Open sqlconn
>
This is all the code I really needed to see. I don't use MySQL so I'm
not sure how the server is supposed to be referred to. Maybe you can try
an example at www.connectionstrings.com

Where is the error message you are getting? You could modify your code
to have vbscript handle the error and display the actual error message,
like this:

on error resume next
connection.Open sqlconn
if err <> 0 then
Response.Write err.message
else
'open the recordset and process it
end if

You are limiting our ability to help you by not telling us what error
message you are getting.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: Simple ASP DB problem.

am 15.01.2008 19:19:18 von Jeff Dillon

Echo? Should be:

Response.Write sName

If that doesn't work, remove all other code, and have one line:

<%

Response.Write "Hello World"

%>

and go from there

Jeff
"Des" wrote in message
news:763a214e-21f2-47e8-9ad3-7920fe819624@q39g2000hsf.google groups.com...
> On 15 Jan, 15:27, "Bob Barrows [MVP]"
> wrote:
>> Des wrote:
>> > I am trying to connect to a MySQL database on a windows server using
>> > ASP / ADODB
>>
>> > I keep getting unable to display page
>>
>> >http://www.desmond-otoole.co.uk/index.asp
>>
>> Not without seeing the code used to connect, as well as the acutal error
>> message ... do you have "friendly errors" shut off so you you can see
>> the actual errors in your browser?http://www.aspfaq.com/show.asp?id=2109
>>
>> --
>> Microsoft MVP -- ASP/ASP.NET
>> Please reply to the newsgroup. The email account listed in my From
>> header is my spam trap, so I don't check it very often. You will get a
>> quicker response by posting to the newsgroup.
>
> ------------------
> Hear is the entire code for the page. This is a MYSQL database
>
> <%@ Language=VBScript %>
>
> <%
> Set connection = Server.CreateObject("ADODB.Connection")
> Set rsResult = Server.CreateObject("ADODB.Recordset")
>
> sqlconn =
> "Driver={mySQL};Server=mysql12.streamline.net;Database=desmo ndot;Uid=desmondot;Pwd=s131679"
> connection.Open sqlconn
>
> sqlResults = "SELECT * FROM Members"
>
> rsResult.Open sqlResults, connection
> rsResult.MoveFirst
> sName = rsResult("f_name")
>
> echo sName
> %>

Re: Simple ASP DB problem.

am 15.01.2008 19:26:38 von Des

On 15 Jan, 18:19, "Jeff Dillon" wrote:
> Echo? Should be:
>
> Response.Write sName
>
> If that doesn't work, remove all other code, and have one line:
>
> <%
>
> Response.Write "Hello World"
>
> %>
>
> and go from there
>
> Jeff"Des" wrote in message
>
> news:763a214e-21f2-47e8-9ad3-7920fe819624@q39g2000hsf.google groups.com...
>
>
>
> > On 15 Jan, 15:27, "Bob Barrows [MVP]"
> > wrote:
> >> Des wrote:
> >> > I am trying to connect to a MySQL database on a windows server using
> >> > ASP / ADODB
>
> >> > I keep getting unable to display page
>
> >> >http://www.desmond-otoole.co.uk/index.asp
>
> >> Not without seeing the code used to connect, as well as the acutal erro=
r
> >> message ... do you have "friendly errors" shut off so you you can see
> >> the actual errors in your browser?http://www.aspfaq.com/show.asp?id=3D2=
109
>
> >> --
> >> Microsoft MVP -- ASP/ASP.NET
> >> Please reply to the newsgroup. The email account listed in my From
> >> header is my spam trap, so I don't check it very often. You will get a
> >> quicker response by posting to the newsgroup.
>
> > ------------------
> > Hear is the entire code for the page. This is a MYSQL database
>
> > <%@ Language=3DVBScript %>
>
> > <%
> > Set connection =3D Server.CreateObject("ADODB.Connection")
> > Set rsResult =3D Server.CreateObject("ADODB.Recordset")
>
> > sqlconn =3D
> > "Driver=3D{mySQL};Server=3Dmysql12.streamline.net;Database=3 Ddesmondot;U=
id=3Ddesmon=ADdot;Pwd=3Ds131679"
> > connection.Open sqlconn
>
> > sqlResults =3D "SELECT * FROM Members"
>
> > rsResult.Open =A0sqlResults, connection
> > rsResult.MoveFirst
> > sName =3D rsResult("f_name")
>
> > echo sName
> > %>- Hide quoted text -
>
> - Show quoted text -

-----------------
Error is
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified

/index.asp, line 9


Line 7: sqlconn =3D
"Driver=3D{mySQL};Server=3Dmysql12.streamline.net;Database=3 Ddesmondot;Uid=
=3Ddesmondot;Pwd=3Ds131679"
Line 8: conn.ConnectionString =3D sqlconn
Line 9: conn.open

Desmond

Re: Simple ASP DB problem.

am 15.01.2008 19:43:00 von reb01501

Des wrote:
> Error is
> Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>
> [Microsoft][ODBC Driver Manager] Data source name not found and no
> default driver specified
>
> /index.asp, line 9
>
>
> Line 7: sqlconn =
>
"Driver={mySQL};Server=mysql12.streamline.net;Database=desmo ndot;Uid=des
mondot;Pwd=s131679"
> Line 8: conn.ConnectionString = sqlconn
> Line 9: conn.open
>
Ok, have you verified the syntax of your connection string a
www.connectionstrings.com?
The "mysql12.streamline.net" bit looks suspicious to me, but I'm used
the MS SQL Server, so that could be the correct way to refer to it. You
should verify with a mysql newsgroup.

Assuming the name you are using is correct, is that database server
accessible to the web server? And particularly, is it accessible to the
user account being used to run your code? If your website allows
anonymous access, then that user account is the IUSR_MachineName account
(replace "MachineName" with the name of the machine running the web
server ... )

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: Simple ASP DB problem.

am 15.01.2008 19:45:09 von Des

On 15 Jan, 18:26, Des wrote:
> On 15 Jan, 18:19, "Jeff Dillon" wrote:
>
>
>
>
>
> > Echo? Should be:
>
> > Response.Write sName
>
> > If that doesn't work, remove all other code, and have one line:
>
> > <%
>
> > Response.Write "Hello World"
>
> > %>
>
> > and go from there
>
> > Jeff"Des" wrote in message
>
> >news:763a214e-21f2-47e8-9ad3-7920fe819624@q39g2000hsf.googl egroups.com...=

>
> > > On 15 Jan, 15:27, "Bob Barrows [MVP]"
> > > wrote:
> > >> Des wrote:
> > >> > I am trying to connect to a MySQL database on a windows server usin=
g
> > >> > ASP / ADODB
>
> > >> > I keep getting unable to display page
>
> > >> >http://www.desmond-otoole.co.uk/index.asp
>
> > >> Not without seeing the code used to connect, as well as the acutal er=
ror
> > >> message ... do you have "friendly errors" shut off so you you can see=

> > >> the actual errors in your browser?http://www.aspfaq.com/show.asp?id=
=3D2109
>
> > >> --
> > >> Microsoft MVP -- ASP/ASP.NET
> > >> Please reply to the newsgroup. The email account listed in my From
> > >> header is my spam trap, so I don't check it very often. You will get =
a
> > >> quicker response by posting to the newsgroup.
>
> > > ------------------
> > > Hear is the entire code for the page. This is a MYSQL database
>
> > > <%@ Language=3DVBScript %>
>
> > > <%
> > > Set connection =3D Server.CreateObject("ADODB.Connection")
> > > Set rsResult =3D Server.CreateObject("ADODB.Recordset")
>
> > > sqlconn =3D
> > > "Driver=3D{mySQL};Server=3Dmysql12.streamline.net;Database=3 Ddesmondot=
;Uid=3Ddesmon­­dot;Pwd=3Ds131679"
> > > connection.Open sqlconn
>
> > > sqlResults =3D "SELECT * FROM Members"
>
> > > rsResult.Open =A0sqlResults, connection
> > > rsResult.MoveFirst
> > > sName =3D rsResult("f_name")
>
> > > echo sName
> > > %>- Hide quoted text -
>
> > - Show quoted text -
>
> -----------------
> Error is
> Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>
> [Microsoft][ODBC Driver Manager] Data source name not found and no
> default driver specified
>
> /index.asp, line 9
>
> Line 7: sqlconn =3D
> "Driver=3D{mySQL};Server=3Dmysql12.streamline.net;Database=3 Ddesmondot;Uid=
=3Ddesmon=ADdot;Pwd=3Ds131679"
> Line 8: conn.ConnectionString =3D sqlconn
> Line 9: conn.open
>
> Desmond- Hide quoted text -
>
> - Show quoted text -

=================3D
Thanks Guys. I have changed the connection string to
"Driver=3D{MySQL ODBC 3.51
Driver};Server=3Dmysql12.streamline.net;Database=3Ddesmondot ;Uid=3Ddesmondot=
;Pwd=3Ds131679"
NOW this works

Cheers -> Desmond

Re: Simple ASP DB problem.

am 15.01.2008 23:11:12 von Ted Dawson

NOW would be a very good time to change your password.

Re: Simple ASP DB problem.

am 15.01.2008 23:20:02 von exjxw.hannivoort

Ted Dawson wrote on 15 jan 2008 in microsoft.public.inetserver.asp.general:

> NOW would be a very good time to change your password.

Now would be a better time to learn quoting, Ted.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Re: Simple ASP DB problem.

am 16.01.2008 00:24:00 von Ted Dawson

>> NOW would be a very good time to change your password.
>
> Now would be a better time to learn quoting, Ted.



Didn't want to repeat the PW again.