Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting via IP Address????

Status
Not open for further replies.

MnM

Programmer
Nov 1, 2000
47
0
0
US
I'm not even sure if this can be done..hence the reason I thought I'd come here.

Here is the scenario:

I have a VB application on computer A.

I have the Access Database on computer B.

The only way I can get to the database is through computer B's IP Address. (Ex.
So what I am wondering is, is there a way in Visual Basic I can connect to the database via its IP Address? Like I said I'm not even sure if this can be done.
 
U can do it thru the dsn by giving the ip address for the servername attribute in the dsn for eg:

ConStrEpay=driver={SQL server};server=ipaddress;UID=rapidepay;PWD=s1tart;Database=apepayp01
 
psst my two cents

I agree with James that probably the simplest way would be to ask someone for the server's unc name. & to map a drive to the virtual folder's real path.

Another (more complex) scenario would be to write it in a client/server fashion and have an ActiveX dll sit on the server & access it via your vb app.

You could use Remote Data Services, MTS, DCOM, ASP etc to access the database through an ActiveX Dll.

Hope this helps
Craig

BTW (Remote Data Services is the simplest of the complex scenarios to implement. If you like I can provide an example)
 
Caf, Can you provide that example that you mentioned above? Thanks! Snaggs
tribesaddict@swbell.net
 
I am connecting to another server which is our ISP and this is the code they gave me.

this is VBscript but it should work for you.

Set Conn = server.CreateObject("ADODB.Connection")
Conn.Open "driver=SQL Server;server=yourserver.com;uid=user;pwd=pass;database=Universal1;"
Set RS = Conn.Execute("SELECT Count(*) AS Recs FROM [Copy-PartMaster Lite]


DougP, MCP
dposton@universal1.com

Ask me how Bar-codes can help you be more productive.
 
Hi

Sorry snaggs for only replying now to your post but I've been a tad busy.

I'll post an example with instructions on how to implement in the new year.

Seasons greetings
caf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top