>>Of course, if you are using the value for a primary key, you may want to consider using the UniqueIdentifier data type and GUID values... this eliminates the need to go to the back end for every id.
>
>Bob,
>
>I'm planning to do so ; let generate the PK by the backend, but the users key (for example invoicenumber which needs to restart every year) by this mechanism. I was wondering if it was possible to change the autonumbering that SQL7 does, programmatically ; I mean ; could I use this autonumbering for my invoicenumbering also and let it restart at 1 from VFP whenever I want ?
I think, maybe Mike L will jump in an confirm this, you can reset the start value of the Identiy field with an alter-table command.
Alter Table MyTable Alter Column MyColumn Identity(1,1)
You sould be able to send that command with SQLExec(). Give it a try.
BOb
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only