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 June 2nd, 2003, 08:44 AM
ekraft84 ekraft84 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 7 ekraft84 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
connecting a mySQL db via ASP

Hey Guys,

I'm having trouble making the connection to my mySQL db within an ASP page. Is there a good resource I can go to for some help?

Thanks.

Reply With Quote
  #2  
Old June 2nd, 2003, 09:06 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Please search the forums before posting - this question has been answered many times here.
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #3  
Old June 2nd, 2003, 09:35 AM
ekraft84 ekraft84 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 7 ekraft84 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
My main question is (which I didn't find an answer for) is:

If I am running my ASP pages on my Windows server, and I want to access the mySQL db, which is on a separate Linux server, how do I do that?

Can I reference it via a mapped network drive? A direct drive letter? The actual name and path to the linux server? I have no idea what to do here.

Any help would be greatly appreciated.

Thanks.

Reply With Quote
  #4  
Old June 2nd, 2003, 10:46 AM
iahmed iahmed is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: USA
Posts: 171 iahmed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 58 sec
Reputation Power: 6
StrIP=Request.ServerVariables("SERVER_NAME")

MyServerDataBase="db_myDatabase;"

dbUser="uid=myUserName;"
dbPassword="pwd=MyPassword;"
strForConnection_GL = "DRIVER={mySQL};" & _
"Server=" & StrIP & _
";Port=3306;" & _
"Option=131072;" & _
"Stmt=;" & _
"Database=" & MyServerDataBase & _
";Uid=root;" & _
"Pwd=;"

DbDSN=strForConnection_GL
set conn = server.CreateObject("ADODB.Connection")
set rs = server.CreateObject("ADODB.Recordset")
conn.Open DBDSN
rs.ActiveConnection = conn
if conn.errors.count <> 0 then
response.write "Error!"
end if

Reply With Quote
  #5  
Old June 2nd, 2003, 01:50 PM
iahmed iahmed is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: USA
Posts: 171 iahmed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 58 sec
Reputation Power: 6
Can I reference it via a mapped network drive? NO

A direct drive letter? NO

The actual name and path to the linux server? No

Answer: Just use IP address of the Linux Server

Reply With Quote
  #6  
Old June 3rd, 2003, 02:27 PM
ekraft84 ekraft84 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 7 ekraft84 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
"Data source name not found and no default driver specified"

Do I need to specify something else?

Thanks.

Reply With Quote
  #7  
Old June 3rd, 2003, 04:36 PM
iahmed iahmed is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: USA
Posts: 171 iahmed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 58 sec
Reputation Power: 6
Probably you didnt install ODBC driver for MySQL
If not download it from
www.mysql.com

Reply With Quote
  #8  
Old June 4th, 2003, 07:31 AM
ekraft84 ekraft84 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 7 ekraft84 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I did install the driver. I actually uninstalled it and reinstalled it to make sure ..

Reply With Quote
  #9  
Old June 5th, 2003, 07:59 AM
ekraft84 ekraft84 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 7 ekraft84 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
So I still cannot connect via a connection string or DSN. I *can* connect to it via "testing data source" in IIS. I can also connect to the db via SQLyog (gui interface for the db). Still unable to connect via an ASP page though.

So my ODBC driver is installed correctly, right? What else am I missing?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > connecting a mySQL db via ASP


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