Menu

#4 Key Fields on Recreating Tables

open
None
8
2002-11-30
2002-11-22
Wes Grant
No

Need to make sure that key does not already esist
when converting a table from one to another.

Discussion

  • Wes Grant

    Wes Grant - 2002-11-30
    • priority: 5 --> 8
     
  • Sebastian Loncar

    Logged In: YES
    user_id=552859

    to kill this bug:
    File table.vb, Change "Public Sub Create(TableName as
    String)" to "Public Sub Create(TableName as String,
    CreateConstraints As Boolean)"
    Put a "If CreateConstraints Then" arround "cmd = New
    SQLCommand("ALTER TABLE [" & TableName & "] ADD
    CONSTRAINT PK_".... and cmd.Execute

    file: tables_design.vb: Change "NewTable.Create
    (NewTable.Name)" to "NewTable.Create (NewTable.Name,
    True)"

    I hope this help you.

     
  • Sebastian Loncar

    Logged In: YES
    user_id=552859

    I foget:
    File table.vb, class Table, Function Convert:
    Change "NewTable.Create (NewTable.Name & "_Temp")" to
    NewTable.Create (NewTable.Name & "_Temp", False)
    and create the Primary after the drop of the table.

     

Log in to post a comment.