Unix Technical Forum

Create DSN programmatically cannot set Port (VBA)

This is a discussion on Create DSN programmatically cannot set Port (VBA) within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> Hello, I have tried for the past three days to find all of the possible attributes for SQL Server ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > MS SQL ODBC

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 07:32 PM
Debbie
 
Posts: n/a
Default Create DSN programmatically cannot set Port (VBA)

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=Yes" & Chr(0) & _
"Description=IMO Database" & Chr(0) & Chr(0) & _
"Login ID=imoreader" & Chr(0) & _
"Password=somepassword" & 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 08:42 PM
srinivas_t
 
Posts: n/a
Default Re: Create DSN programmatically cannot set Port (VBA)


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=Yes" & Chr(0) & _
> "Description=IMO Database" & Chr(0) & Chr(0) & _
> "Login ID=imoreader" & Chr(0) & _
> "Password=somepassword" & 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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:54 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com