Are you able to connect to this database from your ODBC Data Source Administrator?
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz' save a blobFileStreamDataTable To Text Filemy blog
Thread moved to Database Development forum (the "VB6" forum is meant for questions which don't fit in more specific forums)
Originally Posted by Jamie_Garland
I ament doing it through the PC's mysql server it's going through my websites mysql?
I've got no idea what that was supposed to mean, or how it was supposed to answer abhijit's question - and the best thing you can do at this stage is answer it.
Originally Posted by MarkT
Do you have one of the "Microsoft ActiveX Data Objects 2.x Library" selected in the project references?
He must have, otherwise a different error would occur on the Dim lines.
This particular error occurs at the stage where ADO is attempting to communicate with the database driver, which means that the interaction between VB and ADO is fine.
He must have, otherwise a different error would occur on the Dim lines.
Good point.
I would start by finding a connection string that works. Probably the easiest way to do this is through a UDL file.
Create a new Text file and change the extenstion to .udl. Then double click the UDL to open it. From the Provider tab select the driver and then go on to the connection tab. After adding all the info, test the connection. If it works, click the OK button. Now open the UDL file using Notepad. The connection string will be the last line in the file.
1) If that's your server's address... I'd change the code in the first post and block out the IP, the user name, the password and database name.... or you're inviting an attack on your database. Then I'd go ahead and change the password on the server jsut in case.
2) "I dont use the pc for it i use my mysql on my webserver to connect too." -- if that's the case, then you may need to look to your host provider, as some do not allow access to the database from outside their servers. My host is like that. I can't get to the database from the outside, only from my cpanel or my web pages... it's a security thing.
1. What do you mean by run it on the server? Are you running this on a machine other than your pc, or you mean running this code against the database server.
2. Did you test the connection using your ODBC control panel?
So far what I have understood is that you have
a mysql database.
the database is remotely hosted.
you are unable to establish a connection from your vb6 program.
you are able to establish a connection using your mysql client.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz' save a blobFileStreamDataTable To Text Filemy blog