Simple ASP DB problem.

D

Des

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=desmondot;Uid=desmondot;Pwd=s131679"
connection.Open sqlconn

sqlResults = "SELECT * FROM Members"

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

echo sName
%>
 
B

Bob Barrows [MVP]

Des said:
------------------
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=desmondot;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.
 
J

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
 
D

Des

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











- 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 =
"Driver={mySQL};Server=mysql12.streamline.net;Database=desmondot;Uid=desmondot;Pwd=s131679"
Line 8: conn.ConnectionString = sqlconn
Line 9: conn.open

Desmond
 
B

Bob Barrows [MVP]

Des said:
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=desmondot;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 ... )
 
D

Des

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
- 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 =
"Driver={mySQL};Server=mysql12.streamline.net;Database=desmondot;Uid=desmon­dot;Pwd=s131679"
Line 8: conn.ConnectionString = sqlconn
Line 9: conn.open

Desmond- Hide quoted text -

- Show quoted text -

=================
Thanks Guys. I have changed the connection string to
"Driver={MySQL ODBC 3.51
Driver};Server=mysql12.streamline.net;Database=desmondot;Uid=desmondot;Pwd=s131679"
NOW this works

Cheers -> Desmond
 
E

Evertjan.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top