ASP Hosting sale!
Double disk space and transfer for FREE!
Limited time offer! Act Now!

aspdev | articles | tutorials | forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

need help connecting to mysql server in asp

 
Post new topic   Reply to topic    ASPdev.org Forum Index -> SQL Programming (MS SQL Server, MS Access, MySQL)
View previous topic :: View next topic  
Author Message
mubashir



Joined: 10 Jul 2005
Posts: 2

PostPosted: Sun Jul 10, 2005 1:10 am    Post subject: need help connecting to mysql server in asp Reply with quote

im using the following code:
Code:

Dim objConn
Dim objRS
Dim STRING

STRING = "Driver={MySQL ODBC 3.51 Driver}; Server=66.226.64.4; Database=dbname; UID=root; PWD=password; Option=3; Port=3306;"

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open(STRING)
Set objRS = objConn.Execute("SELECT * FROM categories_description")

While Not objRS.EOF
Response.Write objRS.Fields("categories_name") & ", " & objRS.Fields("categories_id") & "<br>"
Response.Write & " "
objRS.MoveNext
Wend

objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing


but i keep getting following error:
Quote:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/index1.asp, line 14


please help, any help would be much appreciated. thanks
Back to top
View user's profile Send private message
administrator
Site Admin


Joined: 01 Oct 2004
Posts: 183

PostPosted: Sun Jul 10, 2005 2:32 pm    Post subject: Reply with quote

You will have to install MySQL ODBC Driver-MyODBC 3.51 if you don't have it on your server yet. You can download it here: mysql.com/downloads/api-myodbc-3.51.html

Check the article below for a reference:

http://www.aspdev.org/articles/asp-mysql-connect/
_________________
Peter
ASP & ASP.NET Articles and Tutorials
Back to top
View user's profile Send private message
mubashir



Joined: 10 Jul 2005
Posts: 2

PostPosted: Sun Jul 10, 2005 5:53 pm    Post subject: Reply with quote

thanks, i'll give that a try, ill let u knw if it works.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ASPdev.org Forum Index -> SQL Programming (MS SQL Server, MS Access, MySQL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group

SQL Tutorial