Create a dsn programmatically in c#
C#
3
Posts
3
Posters
0
Views
1
Watching
-
For Oracle, I use the classes in
Oracle.DataAccess.Client
I start with an XML file with a list of databases:<ORACLEHR Type="ORACLE" Server="servername" Port="8080" Username="HR" Password="hr" />
and pass the information to something like:string.Format
(
"Data Source={0}:{1};User Id={2};Password={3};"
,
Server
,
Port
,
Username
,
UserPassword
)to produce the connection string.
-
P/Invoking the SQLConfigDataSource Function[^] is one way.
Mark Salsbery Microsoft MVP - Visual C++ :java: