Solved

How to access a Remote Database

Posted on 2002-05-24
3
121 Views
Last Modified: 2010-05-02
I want to make a small program in VB 6 and SQL Server 2000 to access a database on a computer in different city. What are the things to be taken under consideration.

And also, please give example in code. Suppose a databse is located on my home computer and there is an internet
connection. Can anyone located in different city have access to the database in my computer.

Rohit.
0
Comment
Question by:rpk2006
3 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7031503
If you can ping to the remote server, half of the game is done. The connection string in VB would simply use the IP address instead the servername, although if the remote computer is know by name also, this will work:

dim c as ADODB.Connection
set c = new ADODB.Connection
c.Open "Provider=SQLOLEDB;Server=<remoteservername or ip>;database=<databasename>;uid=<user id>;pwd=<password>;"
....
c.Close
set c = nothing

Now, if you have a firewall or proxy blocking the traffic over some ports, you should check with the network administrators to open those ports as necessary (default=1433):
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q287932

CHeers
0
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 100 total points
ID: 7031920
0
 

Author Comment

by:rpk2006
ID: 7032486
Thanks Angelll and Vinnyd.
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

Suggested Solutions

Title # Comments Views Activity
how can i unlock a picture file that was loaded in a picturebox in visual c#? 4 84
How to make an ADE file by code? 11 79
MsgBox 4 45
Problem to With line 4 39
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

914 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

17 Experts available now in Live!

Get 1:1 Help Now