PDA

View Full Version : Using more than one Access database


bruce
03-04-2003, 02:08 AM
You don't have to put the connection string in the web.config file.

You can put it in any aspx page. If you want to make the connection string available to the whole application, you can set it as application variable in the application start sub in the global.asa file.

You cannot have more than 1 web.config in a single application.

Hope this helps.

[b]quote:Originally posted by Malin

Hi

Now I use just one Access database in my folder on the server. My problem is that I want to use more than one database but donīt know how to tell the sql connection string in the web.config file that the search path to the database now could be two different paths.

Now it looks like this:

sqlConnectionString="data source=e:\web\fagelfenix1\htdocs\database\XXXXX.md b;user id=sa;password=XXXX"

I have tried to upload a diffrent folder with aspx-files, database and another web.config but this seems to be wrong. I understand that it is only allowed to use ONE web.config in my whole folder (my whole area at discountAsp.net)? Is this right? How can I write in web.config to be able to use more than one database? Or can I use more than one web.config if those are placed in diffrent folders (I must have done something very wrong when I tried this if this should be possible)?

Is there a solution for this "beginners-problem"? [:p]

Malin
</blockquote id="quote"></font id="quote">

Malin
03-04-2003, 12:13 PM
Hi

Now I use just one Access database in my folder on the server. My problem is that I want to use more than one database but donīt know how to tell the sql connection string in the web.config file that the search path to the database now could be two different paths.

Now it looks like this:

sqlConnectionString="data source=e:\web\fagelfenix1\htdocs\database\XXXXX.md b;user id=sa;password=XXXX"

I have tried to upload a diffrent folder with aspx-files, database and another web.config but this seems to be wrong. I understand that it is only allowed to use ONE web.config in my whole folder (my whole area at discountAsp.net)? Is this right? How can I write in web.config to be able to use more than one database? Or can I use more than one web.config if those are placed in diffrent folders (I must have done something very wrong when I tried this if this should be possible)?

Is there a solution for this "beginners-problem"? [:p]

Malin

Malin
03-08-2003, 05:18 AM
Thanks Bruce

It works perfectly now!

[8D]

// Malin