MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old February 25th, 2004, 07:01 AM
jayshah jayshah is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 5 jayshah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Help needed in connecting MySQL database to ASP page on Localhost

Hi,
I am trying to connect a asp page with MySQL and below is the code. The error i am getting is incorrect database name.

But my database of order is in the location mentioned which as 3 files of frm, myd and myi. And the asp page is in the wwwroot folder. So i had to give this path to database.

Please help me with this problem.

Thanks,
Jay

----------------------------------------------------------------------

<html>
<body>
<%@ Language=VBScript %>
<%
Dim my_conn, strSQL, rs
Set my_conn = createobject("ADODB.Connection")

my_conn.open = "DRIVER={MySQL ODBC 3.51 Driver};"_
& "SERVER=localhost;"_
& "DATABASE=C:\Program Files\mysql\data\order;"_
& "UID=root;"_
& "PWD=;"

strSQL = "SELECT * FROM table"

Set rs = conn.Execute(strSQL)

Do while not rs.eof
Response.Write "Name: " & rs("customers") & "<br>"

rs.MoveNext loop

my_conn.close
Set my_conn = nothing 'obj variable released

%>
</body>
</html>

--------------------------------------------------------------------------

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > Help needed in connecting MySQL database to ASP page on Localhost


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway