VB and VBA Users Source Code: Setting the Workstation ID or Host Name in ADO
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Setting the Workstation ID or Host Name in ADO
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Thursday, July 26, 2001
Hits:
911
Category:
Database/SQL/ADO
Article:
I have tried to set the host name using ADO in the past and failed. The following example connection string was sent to me by Matt Johnston and it does the trick. It uses the Extended Properties to set the Host Name (or Workstation ID as MS call it). oCon.ConnectionString = "Provider=MSDASQL.1;Connect Timeout=15;Extended Properties=""DRIVER=SQL Server;SERVER=TESTSERV;UID=username;PWD=password;APP=Visual Basic;DATABASE=TEST_DB;WSID=TEST"";" 'Locale Identifier=1033"
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder