Click here to Skip to main content
15,916,693 members
Home / Discussions / Database
   

Database

 
QuestionSettings and Connection string full dereference Properties.Settings.dbConnectionString Pin
g18c20-Jun-07 12:03
g18c20-Jun-07 12:03 
QuestionRandom Search Pin
Red Lake20-Jun-07 11:28
Red Lake20-Jun-07 11:28 
AnswerRe: Random Search Pin
gauthee20-Jun-07 18:25
gauthee20-Jun-07 18:25 
GeneralRe: Random Search Pin
Red Lake21-Jun-07 2:35
Red Lake21-Jun-07 2:35 
Questionselect stataement Pin
seemamltn20-Jun-07 10:22
seemamltn20-Jun-07 10:22 
AnswerRe: select stataement Pin
gauthee20-Jun-07 18:13
gauthee20-Jun-07 18:13 
AnswerRe: select stataement Pin
vimal_yet20-Jun-07 18:27
vimal_yet20-Jun-07 18:27 
QuestionConnection Strings & App.config with class libaries Pin
g18c20-Jun-07 9:48
g18c20-Jun-07 9:48 
Hi, i have a class library which implements a data access tier. As i used the automated designer for the dataset it automatically added an app.config in the class library with the string to the database:

<connectionstrings>
<add name="AppDatabase.Properties.Settings.dbConnectionString"
="" connectionstring="Data Source ="D:\Chris\db.sdf"" providername="Microsoft.SqlServerCe.Client">


I then use this data access class library in my main application, however how can i change and update this connection string and point it to a different file at runtime? I would like to be able to select a different database but it seems (from breakpoints in the generated table adapter code - InitConnection()) the default values are being called (in this case from the xml app config above).

How can i get, or indeed override the connection string setting for the database, whilst at the same maintain all the other settings which are in place for the main app (ie user preferences, persistent settings etc)? I tried creating a setting in the main default application of dbConnectionString, but it always picks up the one from the AppDatabase class library namespace.

Thanks in advance,

Chris
AnswerRe: Connection Strings & App.config with class libaries Pin
Not Active20-Jun-07 10:02
mentorNot Active20-Jun-07 10:02 
GeneralRe: Connection Strings & App.config with class libaries Pin
g18c20-Jun-07 10:22
g18c20-Jun-07 10:22 
GeneralRe: Connection Strings & App.config with class libaries Pin
Not Active20-Jun-07 11:47
mentorNot Active20-Jun-07 11:47 
GeneralRe: Connection Strings & App.config with class libaries Pin
g18c20-Jun-07 20:17
g18c20-Jun-07 20:17 
QuestionSQL Server Question: How do I view the database log? [modified] Pin
Xiangyang Liu 刘向阳20-Jun-07 8:12
Xiangyang Liu 刘向阳20-Jun-07 8:12 
AnswerRe: SQL Server Question: How do I view the database log? Pin
Sathesh Sakthivel20-Jun-07 8:42
Sathesh Sakthivel20-Jun-07 8:42 
GeneralRe: SQL Server Question: How do I view the database log? Pin
Xiangyang Liu 刘向阳20-Jun-07 12:26
Xiangyang Liu 刘向阳20-Jun-07 12:26 
AnswerRe: SQL Server Question: How do I view the database log? Pin
Mike Dimmick21-Jun-07 5:25
Mike Dimmick21-Jun-07 5:25 
GeneralRe: SQL Server Question: How do I view the database log? Pin
Xiangyang Liu 刘向阳21-Jun-07 13:25
Xiangyang Liu 刘向阳21-Jun-07 13:25 
QuestionHow to backup a database Pin
lune1220-Jun-07 6:27
lune1220-Jun-07 6:27 
AnswerRe: How to backup a database Pin
Sathesh Sakthivel20-Jun-07 8:39
Sathesh Sakthivel20-Jun-07 8:39 
Questionembedding a sql DB in a win32 app Pin
TintinV3ck20-Jun-07 6:26
TintinV3ck20-Jun-07 6:26 
AnswerRe: embedding a sql DB in a win32 app Pin
originSH20-Jun-07 21:52
originSH20-Jun-07 21:52 
GeneralRe: embedding a sql DB in a win32 app Pin
TintinV3ck21-Jun-07 5:32
TintinV3ck21-Jun-07 5:32 
AnswerRe: embedding a sql DB in a win32 app Pin
Mike Dimmick21-Jun-07 5:33
Mike Dimmick21-Jun-07 5:33 
Questionblob with sql server Pin
WhiteGirl2320-Jun-07 3:09
WhiteGirl2320-Jun-07 3:09 
AnswerRe: blob with sql server Pin
Giorgi Dalakishvili20-Jun-07 4:00
mentorGiorgi Dalakishvili20-Jun-07 4:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.