Solved

How can I connect to remote database?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

910 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

23 Experts available now in Live!

Get 1:1 Help Now