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:
  #1  
Old August 8th, 2003, 09:19 AM
nandip nandip is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: India
Posts: 2 nandip User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ASP-MySQL unable to connect through DSN less Connection String

Hello friends i am new to this forum. Now i am having one problem when connecting to MySQL database with dns connection string.

I am working in Microsoft ASP. Till now i was connecting to M.S SQL to connect to database with dsn less connection string.
Both my web server and database server as on the same computer so i did not have any problem connecting to the databse.
But now in one project we have to use MySQL database.
The script langauged to be used is ASP only. Now the database is on another server (linux server).
So now i have to connect from my computer(Windows 2000) to the another computer(Linux) on LAN.
For this first i installed MyODBC successfully from URL
Now i am able to connect successfully from my script to the mysql databas if i provide system dsn. ( i created a system dsn when i have connected to the database residing on linux).
But when i use dns less connection string then i get following error.

===========================================

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

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

=============================================

Now the connection string that is use is as follows

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

Set Conn = Server.CreateObject("ADODB.Connection")

Conn.Open "driver={MySQL}; Server=server address; Port=3306; Option=0; Socket=; Stmt=; Database=databasename; Uid=myuserid; Pwd=mypassword;"

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

in case of Server parameter i am directly providing the ip address of the linux server on which my database resides in mysql.

I checked no. of sites for the solution but i couldn't find a solution to this.
I strictly want to use dns less connection string only.

So please let me know what should i do in this situation and what should i check for and where exactly am i going wrong?

Any help will be sincerely appreciated.

Thank You

Reply With Quote
  #2  
Old August 11th, 2003, 08:38 AM
rdoekes rdoekes is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Strasbourg, France
Posts: 181 rdoekes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 20 sec
Reputation Power: 7
Send a message via AIM to rdoekes Send a message via Yahoo to rdoekes
What about this one?
Code:
oConn.Open "Provider=MySQLProv;" & _
           "Data Source=mySQLDB;" & _
           "User Id=myUsername;" & _
           "Password=myPassword" 
__________________
- Rogier Doekes

Reply With Quote
  #3  
Old August 13th, 2003, 11:57 PM
nandip nandip is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: India
Posts: 2 nandip User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you for you reply.

But i am still having confusion.
In the code that you have given, in first line
i.e.
Provider=MySQLProv;

Now in above line what do i have to write in provider. I was writing mySQL till now . do i have to hardcode the word "MySQLProv" ?
Also the code that you have given does not inclue the "Server" and the "Port" parameter and i will have to provide that as the request that i am making to mySQL database is on another server.
I tried to connect with the code that you gave.
i.e i kept
Provider=MySQLProv; and then change other paramerter i.e
database.username and password and also included the
server and port paramerter and then when i tried to connect i got following error

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

ADODB.Connection error '800a0e7a'

Provider cannot be found. It may not be properly installed.

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

Now i have properly installed myODBC becuase i am able to connect with DSN so i think that is not a problem. that what exactly it is. can you tell me?

Thanks once again.

Reply With Quote
  #4  
Old January 5th, 2004, 04:20 AM
support support is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 1 support User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
pl try with this.
Driver=mySQL};Server=db1.database.com;Port=3306;Op tion=131072;Stmt=;Database=mydb;Uid=myUsername;Pwd =myPassword

Reply With Quote
  #5  
Old March 14th, 2004, 09:16 AM
zeus zeus is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 zeus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
using ODBC try this:
DRIVER={MySQL ODBC 3.51 Driver};database=<<Database>>;server=<<server>>;uid=<<user>>;password=<<password>>;option=3;

using OLEDB try this:
Provider=MySQLProv;Location=<<server>>;Data Source=<<db>>;USER ID=<<user>>;PASSWORD=<<password>>;option=3;port=3306;

Zeus

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > ASP-MySQL unable to connect through DSN less Connection String


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
Stay green...Green IT