gpdeering
Posts: 57
|
Posted: 06/12/2006, 4:51 AM |
|
Is there another place to put the connection string? CCS puts it in the web.config (for .NET applications).
I'm using an MS Access table, and I read somewhere that the JET engine requires that the DB be on the server's local hard drive (as opposed to some networked drive). The application will be on a new server farm, and I don't know the absolute local path for the DB. Furthermore, the ASP function, Server.MapPath(), will not work in the strictly-formatted-XML web.config file.
As I see it, my options are two:
1.) Start using an MS SQL Server DB, or
2.) Edit out the connection string in the web.config file and find a new place to put it inside the code-behind pages.
Any ideas out there?
thanks,
gpdeering
|
|
|
Stan
|
Posted: 06/13/2006, 6:16 AM |
|
You can also use the ODBC DSN, defined on the server. Or place the connection string directly in the code. It can be placed into Common Files > Settings.cs. Find the property with name <ConnectionName>Connection, and replace the second line of code
cs.Connection=ConfigurationSettings.AppSettings["<ConnectionName>String"];
on
cs.Connection="some string" + System.Web.HttpContext.Server.MapPath("path to DB");
But in this case you will not able to modify it without application recompiling.
|
|
|
gpdeering
Posts: 57
|
Posted: 06/13/2006, 2:35 PM |
|
Good! Thanks.
Too bad I can't try it out now. I'll be on vacation for the next three weeks. So, I'll have to get back to you on the results.
Thanks again.
--gpdeering
|
|
|
|