c# - Set Connection String of DataSet.xsd based on User Setting -


situation

i have c# program utilizes dataset.xsd displaying sales data in window. works connection string dataset.xsd uses hardcoded .accdb file , dynamic assignment.

problem

the specific file path of database can changed in user settings, leads path issue sales window. connection string being grabbed user setting in program.

1

question

the c:\fits\fits3sr\fits_7.accdb segment path changed user. there way programitcally or dynamically change connection string?

i figured out workaround it. because connection string forced application setting, set read setting default , under impression not edited. fortunately, able change value of application setting @ runtime using following line:

properties.settings.default["settingname"] = "connection string goes here"; 

hope helps else.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -