Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Locking with SQL7
Message
From
01/03/2000 11:16:25
 
 
To
01/03/2000 02:56:16
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00338970
Message ID:
00339843
Views:
24
>>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
Map
View

Click here to load this message in the networking platform