| Dart Home | PowerTCP Winsock for ActiveX | Custom Development | Reply | PowerTCP Winsock for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Winsock for ActiveX Topic: Using GetAddress in Access 2000 |
| gcorbin_51 gcorbin@ptc.com From: Needham, MA USA Posts: 2 Member Since: 06/03/04 |
posted June 3, 2004 1:28 PM Not sure if I can do what I want. I have a MS-Access table with machine names. I want to get their IP addresses. Trying the following code: Public Function Test(Name_to_Test As String) As String On Error GoTo OnError ' use intrinsic error handling Dim Addresses As DartStrings Set dns1 = New dns dns1.ServerName = "dns.nameserver.com" dns1.GetAddress Name_to_Test Test = dns1.Addresses Exit Function OnError: ' Any error jumps here Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description Test = "XXX.XXX.XXX.XXX" End Function (ServerName not actual one that I am using.) I get the following message: Error #12016: The was a failure on the server. Also, I have 7 records in my test table, but it looks like the finction Test is being called only once. Thanks |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted June 3, 2004 2:13 PM Two things: 1) "The was a failure on the server" means just that and I can't tell you why it fails unless you can provide me with the address of a server that it fails on 2) I'm surprised that this line works: Test = dns1.Addresses Test is a string and Dns.Addresses is a DartStrings collection. If anything I would expect that to be: Test = dns1.Addresses.All |
| gcorbin_51 gcorbin@ptc.com From: Needham, MA USA Posts: 2 Member Since: 06/03/04 |
posted June 3, 2004 3:12 PM Thanks for the help. You were right on the Test = dns1.Addresses.All. It is now working. I thought that I could pass it a simple machine name like in ping (i.e. ping macnine1). The DSN Controls appear to need fully qualified machine name (i.e. machine1.ptc.com). great product - thanks |
| Reply | PowerTCP Winsock for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|