Solved

How can I connect to remote database?

Posted on 2004-10-18
1
238 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 500 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

Industry Leaders: 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…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

726 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