Solved

How can I connect to remote database?

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now