Using Multiple Databases

Tips submitted by ASP.NET Maker users

Using Multiple Databases

Postby pel » Sat Apr 24, 2010 12:15 am

If (like me) you're still on 7.1 and you have a project where you need to be able to connect to more than one database you may be able to add some server side code to do that. One application I built has to connect to one of several different (identically structured) Access databases depending on a client number. I added server code to the login page under the "User logged in" event to check the client number (which happens to be the first 3 characters of the user ID), modify the connection string based on that client number and place the modified connection string in EW_DB_CONNECTION_STRING.

Note that this only works if you have a situation where only one person at a time is accessing the application or where everyone online is working on the same database -- if more than one person is online and not everyone is using the same database this tip won't work correctly.
pel
 

Re: Using Multiple Databases

Postby pocadmin » Fri Jan 14, 2011 5:27 am

You can do this with Microsoft Access mdb that contains ODBC LINKED connections to the other databases. Point any "Maker" product to this Access Database and you will be able to see data from all linked tables.
pocadmin
 

Re: Using Multiple Databases

Postby cbacit » Sat Sep 21, 2013 4:33 am

Can you give us updated code for version 10 please?
cbacit
 
Posts: 1
Joined: Sat Sep 21, 2013 4:32 am


Return to User Submited Tips (ASP.NET Maker)