Results 1 to 29 of 29

Thread: [RESOLVED] Creating a table (ifnotexists) at startup of my vb.net app [vb.net]

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2007
    Posts
    172

    Resolved [RESOLVED] Creating a table (ifnotexists) at startup of my vb.net app [vb.net]

    Hi,

    I am trying to find out the way on how to create a table at the startup when running my app ...

    This should only happen if the table does not yet exists.

    I have looked into tsql and stored procedures.

    I understand that I will have to add a file to my project in the solution explorer ...

    I understand that it will look similar to :

    CREATE TABLE tblName ( [UID] int, [Name] varchar(64), [Address] varchar(255) )


    What i dont understand is ...

    1) Which item should i add to my project ... ive seen various things been used but am not sure whats correct? .sql? .txt? ...

    2) How would I find out whether the table exists or not?

    3) How do I run this file?


    I hope someone can enlighten me ...

    Many thanks in advance,

    Rob

    I am using VS2005.
    Last edited by Devdude; Apr 30th, 2008 at 06:00 AM. Reason: Solved

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