LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2003, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 3 Dec 2003 16:11:29 -0500
Reply-To:   Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject:   Re: DB parm? for CONNECTION TO
Comments:   To: "Terjeson, Mark" <TERJEM@DSHS.WA.GOV>
Content-Type:   text/plain

Mark:

From http://web-developer.boeldt.net/ODBC.asp SQL Server: Standard Security: "Driver={SQL Server};Server=Aron1;Database=pubs;Uid=sa;Pwd=asdasd;"

Trusted connection: "Driver={SQL Server};Server=Aron1;Database=pubs;Trusted_Connection=yes;"

Prompt for username and password: oConn.Properties("Prompt") = adPromptAlways oConn.Open "Driver={SQL Server};Server=Aron1;DataBase=pubs;"

MS Data Shape "Provider=MSDataShape;Data Provider=SQLOLEDB;Data Source=Aron1;Initial Catalog=pubs;User ID=sa;Password=asdasd;"

The 'Database=<database>;' option looks like the right syntax to me.

Sig -----Original Message----- From: Terjeson, Mark [mailto:TERJEM@DSHS.WA.GOV] Sent: Wednesday, December 03, 2003 12:09 PM To: SAS-L@LISTSERV.UGA.EDU Subject: DB parm? for CONNECTION TO

Hi All,

I can't seem to find CONNECTION TO doc that tells me if there is a parameter that can be used to specify which database you want within a Microsoft SQL Server ODBC DSN. I can go into the ODBC entries and change the default database in the configuration settings manually, but I would like to find the syntax to change it on the fly in my programs.

example:

if DSN='MySQLSvr5'); gets me to the right ODBC entry point such as: PROC SQL; * Establish connection to SQL Server data; CONNECT TO ODBC(DSN='MySQLSvr5');

is there a parameter syntax that will change the target database, such as: (by the way, the syntax below does not work, but is an example of the sort of thing I am after) e.g. DATABASE='Claims');

PROC SQL; * Establish connection to SQL Server data; CONNECT TO ODBC(DSN='MySQLSvr5' DATABASE='Claims');

?????

Hope somebody knows, Mark Terjeson Reporting, Analysis, and Procurement Section Information Services Division Department of Social and Health Services State of Washington mailto:terjem@dshs.wa.gov


Back to: Top of message | Previous page | Main SAS-L page