Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Retrieving data to .asp page via MySQL...

Posted on 2004-08-24
3
Medium Priority
?
182 Views
Last Modified: 2010-04-19
Hi,

I have installed MySQL V4.0.20a-MAX.
I have created the following .asp web page, which is located in the usual wwwroot folder, to pull data from the local MySQL db, but all the page does is sit there trying load the page, but nothing ever appears.
I know 100% the asp service is working, because if I run a test page....the text displays. I have looked at every setting I can think of ?

Here is my .asp page trying to connect to the db.

<html>
<body>

<%

strConnection = "driver={MySQL};server=xx.xxx.xx.x;uid=blah;pwd=blah;database=blah"
Set adoDataConn = Server.CreateObject("ADODB.Connection")
adoDataConn.Open strConnection


strQuery = "SELECT Customers.CustomerName FROM Customers;"

Set RS = adoDataConn.Execute(strQuery)

If RS.eof then

response.write "Boo Hoo"

else

Do until RS.eof

response.write RS("CustomerName") & "<br>"

RS.Movenext

Loop

End IF

%>

</Body>
</html>

_________________

Are there any special setting for data retrieval in Windows Server 2003 that I have not tried ?
This code works perfectly when the connection string points to Our MySQL db hosted on our Linux server, but it does not work on the Windows Server ?
No errors, the page just never loads................

Thanks

David


0
Comment
Question by:scene
  • 2
3 Comments
 
LVL 7

Expert Comment

by:j2nku
ID: 11880763
Have you tried with ODBC connection? There should be MySQL connection and then you can just use connection string "DSN=MyMySQLConnection"
MySQL ODBC drivers should be available here: http://dev.mysql.com/downloads/connector/odbc/3.52.html

I have MySQL on Win2k3 also running, but it's used only by PHP scripts.
0
 

Author Comment

by:scene
ID: 11881405
I have tried everything.
I can see no problem why Windows MySQL should not work with .asp pages ?
I have tried via a DSN.

Either the page just spends ages trying to load, or it just says it cannot find the page etc...
The problem is definately down to the connection string. Is there anything in Windows 2003 Server that could cause this connection problem ?
I've tested an ODBC connection in the ODBC panel, and it connects no problem ?

Still confused ?

David
0
 
LVL 7

Accepted Solution

by:
j2nku earned 500 total points
ID: 11893314
Try to connect not only to IP but also to server name

I had once 2 SQL server instances on a single machine and the thing didn't work before i connected to DBSERV\LOCAL, because DBSERV was a SQL server that was configured not to accept connections.

Of course it applies to MS SQL and i'm not sure about MySQL.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question