Hello everybody ,

Im created an Application in vb6.0 . In that application i have to store data in a web Mysql database.How can i connect tht

Recommended Answers

All 11 Replies

Hi,

Assuming you have experience with ADO, you should download and install MySQL Connector, and then, use a connection string like:

Driver={MySQL ODBC 3.51 Driver};              
Database=[B][I]database_name[/I][/B];                                                
Server=[B][I]server_address[/I][/B];
Port=[B][I]server_port[/I][/B];
Option=19;
Stmt=;
Uid=[B][I]username[/I][/B];
Pwd=[B][I]password[/I][/B]

server_address can be also a name.
server_port will be 3306 most of time.

Hope this helps.

Hello everybody ,

Im created an Application in vb6.0 . In that application i have to store data in a web Mysql database.How can i connect tht

I'm the same murali , but my application write by java. It can only connect in local mysql, but doesn't connect in internet mysql.

Except you to help me.

Hello everybody ,

Im created an Application in vb6.0 . In that application i have to store data in a web Mysql database.How can i connect tht

pls anybody have the ans
i m with same problem here

pls anybody have the ans
i m with same problem here

Create a named entry for the database server use control panel->administrive tools->data source .

Are you able to connect to theweb database from your system ?

Please find connection details here.

To connect to a MySQL server on a remote system:

mysql -h hostname -u root -p root

here hostname is (ex:192.168.20.27 for remote system)
"root " is the username.
-p is password you should provide.(Ex""root")

Connecting to mysql server as root should be discouraged .

Murali, did you solve the problem?

This code a couple of minor bugs with string line continuations, but those are easy enough to fix:

http://www.base64.co.uk/mysql-odbc-driver/

1. Follow the link for the MySQL ODBC Driver and install it (if you haven't already).

2. Be sure to select the Microsoft Remote Data Object 2.0 in your project References.

3. Add your internet service provider as a Remote Database Access host through your control panel (i.e. %.fios.verizon.net).

The first time you attempt to make a connection, the MySQL ODBC Driver install will prompt you to confirm the connection with a pop-up window. It should not come up again.

I had to use my Control Panel User ID and Password to make this work. Virtual ID's did not work (i.e. MyAccountLogin_MyPHPUserID). The only virtual reference that did work was for the actual database itself (i.e. MyAccountLogin_MyDatabaseName).

The only thing left out of this sample is how to pull data fields from the result set. The comments suggest "reference it like !username", but I prefer using something like this:

strName = .rdoColumns.Item("Name")

Lastly, case matters for the table names in your SQL statements. If you have a table named "Products" in your database and you issue a query for a table named "products", it will bomb.

Everything after that should be relatively easy to figure out.

Hope this helps!

hi there. what do you mean by server_address and how can i obtain it. i have a vb application and used xampp in my database i used localhost as my server and it works. my problem is i don't how how to access a xampp database on remote database. thankz in advace.

I have suggested in your own post on how to get a proper answer. This thread is 7 years old and you will not likely get an answer here, sorry.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.