all groups > sql server programming > july 2005 >
You're in the

sql server programming

group:

script to create ODBC DSN with specific port to server


script to create ODBC DSN with specific port to server David Shorthouse
7/12/2005 11:49:20 PM
sql server programming:
Hello folks,

I'm using a port other than 1433 for my SQL Server 2000 database and am
trying to write a vbscript to automate client's ODBC DSN creation. Is it
possible to specify the port used in such a script? I have "Database",
"Descriptions", "Driver", and "Server" additions to the client's registry
via the script, but what about specifying the port? Can this be done via
WshShell.RegWrite?

Thanks for any assistance,

Dave

--
______________________________
Remove "_SPAM" to reply directly.

Re: script to create ODBC DSN with specific port to server David Shorthouse
7/13/2005 1:12:38 AM
I thought I would also add that I have the server address in my vbscript as
"server,port" the client for which I am testing this odbc DSN connection
receives an error 11 when an attempt is made to use this connection.

Dave

--
______________________________
Remove "_SPAM" to reply directly.
[quoted text, click to view]

Re: script to create ODBC DSN with specific port to server John Bell
7/13/2005 1:15:03 AM
Hi

This seems to be under:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo

but you are probably better off using a DSN-Less connection.

John

[quoted text, click to view]
Re: script to create ODBC DSN with specific port to server David Shorthouse
7/13/2005 4:20:08 AM
John,

Thanks for the pointer to think about doing this more efficiently. I
just found this:
http://support.microsoft.com/default.aspx?scid=kb;en-us;892490 and it
appears to work great. However, it looks geared to Access 2002/2003. Does it
work with Access 2000?

Dave

--
______________________________
Remove "_SPAM" to reply directly.
[quoted text, click to view]

Re: script to create ODBC DSN with specific port to server John Bell
7/13/2005 5:17:02 AM
Hi

This may be a better example:
http://support.microsoft.com/default.aspx?scid=kb;en-us;147875 or
http://www.carlprothman.net/Default.aspx?tabid=90#ODBCDriverForSQLServer

The port can certainly be part of the address value if you specify an IP
address, but I am not sure what happens if you specify a name.

John


[quoted text, click to view]
AddThis Social Bookmark Button