Chill
Sep 23rd, 1999, 02:25 AM
I'm using VB6, SQL 7, and ADO... what's the best method to create a table (actually it will be several tables) with a name specified in a VB variable?
I was guessing using a stored procedure called using ADO with one parameter. Ideally I'd like the stored procedure to be something like.
sp_Create_Location_Tables @loc as nvarchar(10)
Will this work? I'm having problems where the stored procedure does something like:
CREATE TABLE [dbo].[@loc] and the name of the table actually ends up being "@loc" not the value of the parameter. Any ideas on how to do this? Also is there a way to append a string in the stored procdure, in the end I want the sp to create 3 different tables each being (using VB syntax) something like @loc & "_vendor", @loc & "_product", etc..
Thanks!
------------------
I was guessing using a stored procedure called using ADO with one parameter. Ideally I'd like the stored procedure to be something like.
sp_Create_Location_Tables @loc as nvarchar(10)
Will this work? I'm having problems where the stored procedure does something like:
CREATE TABLE [dbo].[@loc] and the name of the table actually ends up being "@loc" not the value of the parameter. Any ideas on how to do this? Also is there a way to append a string in the stored procdure, in the end I want the sp to create 3 different tables each being (using VB syntax) something like @loc & "_vendor", @loc & "_product", etc..
Thanks!
------------------