|
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
|