Solved

Retrieving data to .asp page via MySQL...

Posted on 2004-08-24
3
171 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 125 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

920 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now