|
-
Jan 14th, 2004, 06:24 AM
#1
Thread Starter
Fanatic Member
Connect to MYSQL with vb6
Is it possiblie connect to MYSQL with vb6 with adodc or adodb
-
Jan 14th, 2004, 06:48 AM
#2
-
Jan 14th, 2004, 06:57 AM
#3
No.
well actually yes, the "ADO connection" link below should help
-
Jan 14th, 2004, 07:23 AM
#4
Thread Starter
Fanatic Member
could i get an exemple please?
-
Jan 14th, 2004, 07:31 AM
#5
-
Jan 14th, 2004, 08:38 AM
#6
Thread Starter
Fanatic Member
gonna check...thanks for the tip
-
Jan 15th, 2004, 05:13 AM
#7
Thread Starter
Fanatic Member
hummm...didn't solve the problem...it got many exemples but any
for the one i need...
-
Jan 15th, 2004, 05:22 AM
#8
And you need... what?
Elaborate... will you use ADO or an ADO Data control?
-
Jan 16th, 2004, 09:00 AM
#9
Lively Member
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).
-
Jan 22nd, 2004, 05:02 AM
#10
Thread Starter
Fanatic Member
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...
-
Apr 7th, 2005, 09:42 PM
#11
PowerPoster
Re: Connect to MYSQL with vb6
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.
-
Apr 7th, 2005, 10:28 PM
#12
Re: Connect to MYSQL with vb6
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.
-
Apr 7th, 2005, 11:14 PM
#13
PowerPoster
Re: Connect to MYSQL with vb6
 Originally Posted by randem
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.
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.
-
Apr 7th, 2005, 11:30 PM
#14
Re: Connect to MYSQL with vb6
BrailleSchool,
mySQL does need to have it's client / driver installed. Do you have this installed?
-
Apr 8th, 2005, 12:07 AM
#15
PowerPoster
Re: Connect to MYSQL with vb6
 Originally Posted by randem
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.
-
Apr 8th, 2005, 12:20 AM
#16
Re: Connect to MYSQL with vb6
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
-
Apr 8th, 2005, 01:23 AM
#17
PowerPoster
Re: Connect to MYSQL with vb6
 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
I am going to download the MySQL Connector for ODBC, once I have downloaded it, do I install it on my computer?
-
Apr 8th, 2005, 01:29 AM
#18
Re: Connect to MYSQL with vb6
BrailleSchool,
Yes, you need to install it. There is an OLEDB driver for mySQL also. Look here for it
-
Apr 8th, 2005, 01:29 AM
#19
Junior Member
Re: Connect to MYSQL with vb6
I think, U must create a ODBC (if u use OS : windows) to connect mySQL database
-
Apr 8th, 2005, 02:00 AM
#20
PowerPoster
Re: Connect to MYSQL with vb6
 Originally Posted by randem
BrailleSchool,
Yes, you need to install it. There is an OLEDB driver for mySQL also. Look here for it
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?
-
Apr 8th, 2005, 12:08 PM
#21
Re: Connect to MYSQL with vb6
BrailleSchool,
ODBC or OLEDB connections can be made depending on which driver you will use.
-
Apr 8th, 2005, 12:39 PM
#22
PowerPoster
Re: Connect to MYSQL with vb6
 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.
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?
-
Apr 8th, 2005, 02:06 PM
#23
Re: Connect to MYSQL with vb6
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.
-
Apr 8th, 2005, 03:08 PM
#24
PowerPoster
Re: Connect to MYSQL with vb6
 Originally Posted by randem
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.
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?
-
Apr 8th, 2005, 03:25 PM
#25
PowerPoster
Re: Connect to MYSQL with vb6
 Originally Posted by randem
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.
OK. I did the good stuff, I was told the connection was successful. Now I am working on the record view.
Last edited by BrailleSchool; Apr 8th, 2005 at 03:47 PM.
-
Apr 11th, 2005, 08:47 AM
#26
Fanatic Member
Re: Connect to MYSQL with vb6
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.
-
Apr 11th, 2005, 12:18 PM
#27
Re: Connect to MYSQL with vb6
Gensor,
You are incorrect. OLEDB for mySQL does work in VB6. You have to install the coorrect drivers.
-
Apr 11th, 2005, 02:55 PM
#28
Fanatic Member
Re: Connect to MYSQL with vb6
Can you write down a URL where I can download the right version then?
-
Apr 11th, 2005, 03:08 PM
#29
Re: Connect to MYSQL with vb6
Gensor,
That is also in this same thread. What version are you using?
-
Apr 11th, 2005, 03:12 PM
#30
Fanatic Member
Re: Connect to MYSQL with vb6
-
Apr 11th, 2005, 03:50 PM
#31
Re: Connect to MYSQL with vb6
Gensor,
Look here for code examples on connecting (Multi Database Control). What error are you getting?
-
Apr 11th, 2005, 03:57 PM
#32
Fanatic Member
Re: Connect to MYSQL with vb6
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 ?
-
Apr 11th, 2005, 04:09 PM
#33
Re: Connect to MYSQL with vb6
Gensor,
BTW, it's the same thing to connect with either. What is your connection string?
-
Apr 12th, 2005, 07:10 AM
#34
Fanatic Member
Re: Connect to MYSQL with vb6
Here is my connectionString
"Provider=MySQLProv;Data Source=Data;User Id=root;Password=grb"
-
Apr 12th, 2005, 02:07 PM
#35
Re: Connect to MYSQL with vb6
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.
Last edited by randem; Apr 12th, 2005 at 02:10 PM.
-
Apr 12th, 2005, 03:10 PM
#36
Fanatic Member
Re: Connect to MYSQL with vb6
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" !
-
Apr 12th, 2005, 03:39 PM
#37
Re: Connect to MYSQL with vb6
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.
-
Apr 12th, 2005, 05:06 PM
#38
Fanatic Member
Re: Connect to MYSQL with vb6
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.
-
Apr 13th, 2005, 12:09 AM
#39
Re: Connect to MYSQL with vb6
Gensor,
Try
ConnStr = "Provider=MySQLProv; Location=; Data Source=Data; UID=root; Password=grb"
-
Apr 13th, 2005, 06:58 AM
#40
Fanatic Member
Re: Connect to MYSQL with vb6
No, it still open the "MySQL Data Source Name Setup" dialog.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|