In a config file, I typically use an AppSettings value to store the setting like:
<add key="dbconn" value="Data Source=127.0.0.1; User Id=sa;Password=; Initial Catalog=MediaDent; Persist Security Info=False" />
Pervasive:
Provider=PervasiveOLEDB;Data Source=C:\PWorks;
SQL Server:
Data Source=127.0.0.1; User Id=sa;Password=; Initial Catalog=dbname; Persist Security Info=False
MS Access:
Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\dbfolder\viewer.mdb; Persist Security Info=False;
ODBC:
DSN=myDsn;Uid=myUsername;Pwd=;
or
DSN=connectionname;
And that's all I've had to connect to recently.
No comments:
Post a Comment
thanks for the comments!