Home > Archive > MS SQL Server ODBC > April 2005 > Re: Create DSN programmatically cannot set Port (VBA)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Create DSN programmatically cannot set Port (VBA)
srinivas_t

2005-04-23, 8:23 pm


Debbie wrote:
> *Hello,
>
> I have tried for the past three days to find all of the
> possible attributes for SQL Server ODBC, most specifically
> how to 'uncheck' the "Dynamically determine port" option
> and set the port number to 1435.
>
> Here is what I have so far,
> Const IMO_DSN_name = "EAOPS"
> Const IMO_Server_Name = "Y0001-DBS0109-S\WFT2"
> .....
> lngResult = SQLConfigDataSource(
0, ODBC_ADD_DSN, "SQL
> Server", "DSN=" & IMO_DSN_name & Chr(0) & _
> "Server=" & IMO_Server_Name & Chr(0) & _
> "Database=IMO" & Chr(0) & _
> " UseProcForPrepare=Ye
s" & Chr(0) & _
> "Description=IMO Database" & Chr(0) & Chr(0) & _
> "Login ID=imoreader" & Chr(0) & _
> " Password=somepasswor
d" & Chr(0) & _
> "Port=1435" & Chr(0))
>
> I have tried to append the Port number after the server
> name separated by a colon. Also, if I put the second Chr
> (0) at the end instead of after the Description, I get an
> error.
>
> Best regards,
> Debbie *


Hi,
I'm also searching for the same solution of programmatically unchecking
the "Dynamically Determine Port" option.
If you find/have any solution, please let me know.

Regards,
Srinivas



--
srinivas_t
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message32039.html

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com