Change Start Value and Increment of SQL Sequence

Using a macro, how to add a sqlSequence and change its start value?

The following code always set the start value to 1. I'd like it to be set to dlg.startwTxt

Dim seq As SQLServerSequence

...

Set seq = mdl.SQLServerSequences.Add(ent.TableName, ent.Owner)

If dlg.startwChbx = 1 Then
     seq.StartWith = Trim(dlg.startwTxt)
End If

Parents
No Data
Reply
  • I'm guessing that:

    Trim(dlg.startwTxt)

    returns a string.  So you'll need to convert that to an integer first.  So I think you'll need to do something like:

    seq.StarWith = CInt(Trim(dlg.startwTxt))

    Regards,

    Stan

Children
No Data