Forums

This topic is locked

UltraDev connection to MySQL on a Linux server

Posted 17 Sep 2001 11:04:11
1
has voted
17 Sep 2001 11:04:11 Russell Marshall posted:
I am trying to connect to a MySQL server run by my ISP but due to my lack of knowledge of MySQL I am having a problem with the connection string.

Using help from my ISP I have now uploaded my database to my server and can make a connection to it using the driver on my local machine. I cannot however access it using the connection string to their server which means the site does not work online.

The following is the connection string they supplied.

Set Conn = Server.CreateObject("ADODB.Connection"
strConn = "Driver={MySQL}; DATABASE=usernamedb; UID=username; PASSWORD=secret"
Conn.Open strConn

Because UltrDev only has a sigle line text box I cannot enter 3 lines so I entered the string as follows which does not work.

Set Conn = Server.CreateObject("ADODB.Connection";strConn = "Driver={MySQL}; DATABASE=usernamedb; UID=username; PASSWORD=secret";Conn.Open strConn

I supect there is a syntax problem but as I know nothing about MySQL I do not know what the problem is.

If you can correct the string i will be grateful. Hopefully this will help both of us.


Replies

Replied 17 Sep 2001 11:44:10
17 Sep 2001 11:44:10 Tim Green replied:
Use the following format ONLY for your custom connection string. (This string, and equivalent strings for other databases can be foung at www.basic-ultradev.com).

driver={mysql}; database=yourdatabase;server=yourserver;uid=username;pwd=password;option=16386;

Hope this helps

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 18 Sep 2001 14:15:30
18 Sep 2001 14:15:30 Russell Marshall replied:
Thanks Tim I will try this.

What is the option16386 for.

Best Regards
Russell

Replied 18 Sep 2001 22:05:16
18 Sep 2001 22:05:16 Tim Green replied:
I've no idea. I don't use ASP for development. The connection string I quoted (and many more for other databases) can be found at www.basic-ultradev.com. All I know is that the option statement makes all the difference.

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 01 Oct 2001 12:45:55
01 Oct 2001 12:45:55 Russell Marshall replied:
Thanks Tim,

I have now made progress and can connect to the database on the server using my remote connection using the string you supplied.(MMMany Thanks)

This is a big step forward.

I now only have one last obstacle to overcome.

Which is.

Although when I test the connection I get the message connection made successfully, when I try to create a recordset under the databindings tab, I get the message "Unable to retrieve tables click define to test connection"

I know the database is there because I uploaded it using MyODBC and can view it using MySQLFront.

Any further guidance will be much apreciated.

Best Regards
Russell

Reply to this topic