CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 connection string in web.config

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.