?
Solved

How can I connect to remote database?

Posted on 2004-10-18
1
Medium Priority
?
241 Views
Last Modified: 2010-04-23
I'm currently developing an application using VB.net and MySQL , which is an application that can send and recieve customer information from remote database to computer in different locations. Please suggest methods beside using ASP.net ? Thanks for your help.  
0
Comment
Question by:jpytse
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 1000 total points
ID: 12345228
you can connect to the MySQL database on a remote machine and send and recieve data. All you need to establish a connection is a connection string with remote database IP Address and authentication details.

You can connect using ODBC or MySQLDirect .NET Data Provider

using MySQLDirect .NET Data Provider your connection string will be

oMySqlConn.ConnectionString = "User ID=YourUsername;" & _
                              "Password=YourPassword;" & _
                              "Host=xxxx.xxxx.xxxx.xxxx;" & _
                              "Port=3306;" & _
                              "Database=YourDatabaseName;" & _
                              "Direct=true;" & _
                              "Protocol=TCP;" & _
                              "Compress=false;" & _
                              "Pooling=true;" & _
                              "Min Pool Size=0;" & _
                              "Max Pool Size=100;" & _
                              "Connection Lifetime=0"


xxxx.xxxx.xxxx.xxxx=IP Address of remote machine

Using ODBC


oConn.Open "Driver={mySQL};" & _
           "Server=db1.database.com;" & _
           "Port=3306;" & _
           "Option=131072;" & _
           "Stmt=;" & _
           "Database=mydb;" & _
           "Uid=myUsername;" & _
           "Pwd=myPassword"


Now if your program apart from accessing the database will access other Remote machines and pass on some data, you can go for a webservice.


0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question