Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Override access to conn string in web.config
Message
From
02/08/2007 10:22:32
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01245016
Message ID:
01245481
Views:
13
Hi Kevin,


>>Since I cannot come up with a connection string that will work in the web.config file for MS Access I need to override the method that accesses this from the web.config. I could go hunting, but if someone knows where that is it would be helpfull.
>>
>>It looks like I need to hard code something like this:
>>string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" && Server.MapPath("data\SWHT.mdb");
>>
>>There must be an access method looking for the "SWHT\Connection" value in there somewhere.
>
>You can override ABusinessObject's GetConnectionString() method and hard-code the return value.
>


Since with ASP.net there is a App_Data directory designed in, are you planning any way to use data in this directory within the web.config file? It appears one needs to use Server.MapPath() to find it in the connection string, and I don't know how to do this in an xml file.
Thanks for the help
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform