Results 1 to 2 of 2

Thread: [Wrong Forum...] Create new table with variable passed to stored procedure from vb

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612

    [Wrong Forum...] Create new table with variable passed to stored procedure from vb

    Hi everyone. I want to execute a stored procedure from my vb code with a string variable, and create a new table in my database and name the table based on that variable.

    I tried the following, but the table was named EFS_@dteYear

    VB Code:
    1. Create procedure [dbo].[EFS_Table_Creator]
    2. @dteYear char(4)
    3. as
    4. Create Table dbo.EFS_@dteYear (
    5. pkey char(62) Null,
    6. location char(7) null)
    7. GO

    I called this stored procedure like this.
    VB Code:
    1. rs.Open "Exec EFS_Table_Creator '2004'"
    Anyone know what I did wrong?

    Thanks
    Last edited by indydavid32; Aug 2nd, 2004 at 04:44 PM.
    David Wilhelm

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612
    Sorry, wrong forum.....
    David Wilhelm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width