>Hi,
>I have two databases, one is for company A another is for company B, which have same the table files,
>and I have a FORM for users to access the files depend on the selected company,
>how can I switch between the databases inside the FORM at the runtime ?
>
>Thanks.
>Derek
Just use the full SQL Server syntax, instead of SELECT * FROM TableName use:
SELECT * FORM DatabaseName.shema.TableName
If you use CAs that is easy.
Other way is to change connection to sql server.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.