Is it possiblie connect to MYSQL with vb6 with adodc or adodb
Printable View
Is it possiblie connect to MYSQL with vb6 with adodc or adodb
Yep.
No.
well actually yes, the "ADO connection" link below should help ;)
could i get an exemple please?
:wave:
gonna check...thanks for the tip:D
hummm...didn't solve the problem...it got many exemples but any
for the one i need...
And you need... what?
Elaborate... will you use ADO or an ADO Data control?
There is a MySQL server you can connect to using ADO at this site:
http://www.adoanywhere.com
You need to register for the forum then get the database server details. I'll keep my eyses open for you.
Mike (adoanywhere).
thanks for the help again...gonna check that
i need to connect to a mysql server to qwery a database and get the results then.
I don't have to use adodc or adodb, it was an idea...
I created a form to connect to MySQL using ADODC and this is the error message:
Connection failed:
SQLState: '01000'
SQL Server Error: 11004
[Microsoft][ODBC SQL Server Driver ][TCP/IP Sockets]ConnectionOpen(Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 6
[Microsoft][ODBC SQL Server Driver ][TCP/IP Sockets]Specified SQL Server not found.
However, I used the server IP address and its port.
Why do I get this error?
Please advise.
Note: I want to be able to connect to a database, and populate the datagrid. I know how to do that but it seems either my settings are wrong, or the server admin is not letting me gain access.
TDQWERTY,
Look here under the section of Multi Database Control and you will find a working example of code that will connect to a mySQL databse as well as others. If this cannot connect then you are having admin problems.
Quote:
Originally Posted by randem
3706 - Provider cannot be found. It may not be properly installed.
I used the IP address of the server, and the username/password that was specified to login.
BrailleSchool,
mySQL does need to have it's client / driver installed. Do you have this installed?
I have no idea. I am very new to ADODC connections.Quote:
Originally Posted by randem
BrailleSchool,
Look here for more info.
MySQL Connector drivers
MySQL provides a wide range of drivers allowing developers to integrate and customize database applications using their corporate tools of choice. The range of connectors makes it easy to incorporate MySQL into existing applications including:
MySQL Connector/J for the Java platform
MySQL Connector/ODBC for the ODBC application programming interface
MySQL Connector/Net for the .NET platform
Quote:
Originally Posted by randem
I am going to download the MySQL Connector for ODBC, once I have downloaded it, do I install it on my computer?
BrailleSchool,
Yes, you need to install it. There is an OLEDB driver for mySQL also. Look here for it
I think, U must create a ODBC (if u use OS : windows) to connect mySQL database
I installed the first one, downloading and will install the second. Then I should create a test form and an ODBC connection to test right?Quote:
Originally Posted by randem
BrailleSchool,
ODBC or OLEDB connections can be made depending on which driver you will use.
Ok. I am used to ODBC so should try that. If it does not work, I will surely return with error messages/problems.Quote:
Originally Posted by randem
I would love to create an app to access mysql (delete/view/update/insert etc) that shouldnt be too difficult but need to get the connection to work first hehe.
If neither of these work, would you think that the admin has blocked incoming requests using OLEDB/ODBC?
BrailleSchool,
I am not sure, but check to see if you ave the correct port and ip address for mySQL server. The admin might have changed it for security reasons.
Quote:
Originally Posted by randem
If I telnet into my server, I use the domain name. If I FTP, I use the domain name or IP address.
If I go into PHPMyAdmin, I go through port 2082. so do you think that would be the port?
Quote:
Originally Posted by randem
OK. I did the good stuff, I was told the connection was successful. Now I am working on the record view.
I think OLEDB connection for MySQL is only working for VB.Net cause I tried with VB6 and it always open a dialog when I come to the .Open fonction.
Gensor,
You are incorrect. OLEDB for mySQL does work in VB6. You have to install the coorrect drivers.
Can you write down a URL where I can download the right version then?
Gensor,
That is also in this same thread. What version are you using?
I'm using MyOLEDB v.3.0
Gensor,
Look here for code examples on connecting (Multi Database Control). What error are you getting?
Can't I do it with MyOLEDB ?? I told you that OLEDB wasn't working with VB6 and you're asking me to download another program than MyOLEDB!!! Can't you just help me with MyOLEDB ?
Gensor,
BTW, it's the same thing to connect with either. What is your connection string?
Here is my connectionString
"Provider=MySQLProv;Data Source=Data;User Id=root;Password=grb"
Gensor,
Your connection string is ok (if your database name is Data). What I was giving you to download was not another driver it was working code that uses MyOLEDB to connect. This would see if the issue that you are having was your driver and/or database installation.
If the code downloaded worked then it would be something you are doing incorrectly in your code. Post more of your code for the open. Also tell me what error you get.
When I execute the open statement of my ADODB.connection. It always open the "MySQL Data Source Name Setup" dialog (Start -> Programs -> MyOLEDB -> Sample Database Creator)
It looks like there's missing parameters to my connectionString, so I filled in the dialog everything I need and it says "Error occured" !
Gensor,
Well, we still will need to look at your code and possible try a program that is known to work to see what the problem could be.
VB Code:
Dim connMySQL As ADODB.Connection Set connMySQL = New ADODB.Connection Call connMySQL.Open("Provider=MySQLProv;Data Source=Data;User Id=root;Password=grb") ...
The rest of the code is no need cause the problem is on the connection.
Gensor,
Try
ConnStr = "Provider=MySQLProv; Location=; Data Source=Data; UID=root; Password=grb"
No, it still open the "MySQL Data Source Name Setup" dialog.