Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autonumber

Status
Not open for further replies.

Zbob

MIS
Apr 25, 2002
94
US
Is there a way to create a autonumber field in a table in pervasive?
 
What version of Pervasive are you using? If you're using Pervasive.SQL 7.0 or Btrieve 6.15, the autonumber data type is called "autoinc", if you're using Pervasive.SQL 2000 or V8, it's called "identity". So for 2000 or V8, the following would create a table with an autonumber field:
create table test
(f1 identity not null,
f1 char(10))
For Pervasive.SQL 7.0 and Btrieve 6.15, it would be:
Create table test (
f1 autoinc,
f1 char(10))

Then for the insert, you would need to use "0" (that's zero not the letter O). info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top