Hi:
Is there any way to prompt the user for a value and generate a USE statement based on what they enter? I have a VB app that takes a product number from the user and based on a part of the product number needs to make a choice of two different databases from where to pull data.
So if the product number begins with 1, run the select statement from the database called FOO1 but if it begins with 2,run it from the database called FOO2.
Basically, trying to avoid writing two routines with two different connection strings with different initial catalogs.
Thanks
Is there any way to prompt the user for a value and generate a USE statement based on what they enter? I have a VB app that takes a product number from the user and based on a part of the product number needs to make a choice of two different databases from where to pull data.
So if the product number begins with 1, run the select statement from the database called FOO1 but if it begins with 2,run it from the database called FOO2.
Basically, trying to avoid writing two routines with two different connection strings with different initial catalogs.
Thanks