Hi
I am working on a website which so far has a login page which looks into one database to check the clientid a user has entered and if it exists then it stores the client's 'connectionstring' as a session variable. The session variable is then used to connect to client's own individual database. If the username and password entered at logon matches any in the table it will continue to the statistics page, where I need to display ONE table.
As I do not know in advance which client database I need to access I was wondering if someone could point me in the right direction of how to display data from one table in the database depending on the client's connection string...?
I will set some queries up to create/update the table with the statistics to display to the customer - then this table needs to be displayed to the customer on a webpage.
I have been looking at datagrids but I am now not sure that this is going to work as I cannot see how I can bind the datagrid or datasource to a connection string in a session variable - the only way I can get it to work is by linking to a local table in the App Data folder. Is it because you CANNOT link a datagrid to database using a connectionstring which is stored as a session variable?
if this is the case, could anyone give me some ideas on how I would display this table? It will always be the same table name, structure , it is just the connectionstring which will be different each time depending on the login details given in the login page.
Can anyone help with this please, as I am not sure if I am trying to do something impossible?
any guidance would be great!
Thanks very much....
I am working on a website which so far has a login page which looks into one database to check the clientid a user has entered and if it exists then it stores the client's 'connectionstring' as a session variable. The session variable is then used to connect to client's own individual database. If the username and password entered at logon matches any in the table it will continue to the statistics page, where I need to display ONE table.
As I do not know in advance which client database I need to access I was wondering if someone could point me in the right direction of how to display data from one table in the database depending on the client's connection string...?
I will set some queries up to create/update the table with the statistics to display to the customer - then this table needs to be displayed to the customer on a webpage.
I have been looking at datagrids but I am now not sure that this is going to work as I cannot see how I can bind the datagrid or datasource to a connection string in a session variable - the only way I can get it to work is by linking to a local table in the App Data folder. Is it because you CANNOT link a datagrid to database using a connectionstring which is stored as a session variable?
if this is the case, could anyone give me some ideas on how I would display this table? It will always be the same table name, structure , it is just the connectionstring which will be different each time depending on the login details given in the login page.
Can anyone help with this please, as I am not sure if I am trying to do something impossible?
any guidance would be great!
Thanks very much....