Results 1 to 3 of 3

Thread: Linking a newly created table to the main table?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 1999
    Location
    Brisbane, Qld, Australia
    Posts
    78

    Post

    I have a database that creates 2 things when a new user is entered. The first is it creates most of the data into a main table and secondly it creates a new table. How can i get this new table to link itself to the main table through vb? what is the sql statement to create the linkage between the 2. thanx in advance

  2. #2
    Lively Member
    Join Date
    Jun 1999
    Location
    Raleigh, NC
    Posts
    70

    Post

    If you are linking the tables as in setting up a foreign key, then you need to use the CONSTRAINT keyword in the CREATE TABLE method.

    Bash

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 1999
    Location
    Brisbane, Qld, Australia
    Posts
    78

    Post

    I have the following code in the create table part :
    pDatabase.Execute "CREATE TABLE " & TblName & "([TransID] counter,[Date] date,[field] ,[field] text);"

    what do you mean by constraint?

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