VStudio - Auto Increment - IDENTITY flag/property/attribute
Barry G. Sumpter
BarrySum at BigPond.Net.AU
Thu May 31 23:20:27 CDT 2007
The V4RB sample app AutoIncrement.rb shows we can build an Auto Increment
field via SQL in the following code.
How do I flag a field as Auto Increment in VStudio?
dim result as Integer
// by Relational model table Person should have KEY field, which is unique
and NOT NULL.
// It would be IDENTITY field.
result = mDatabase.SQLExecute("CREATE TABLE person ( id ULONG IDENTITY,
firstName STRING(40) )")
showStatistic
Exception exc as VException
wProperties.ShowError( exc )
-----Original Message-----
From: valentina-studio-bounces at lists.macserve.net
[mailto:valentina-studio-bounces at lists.macserve.net] On Behalf Of Barry G.
Sumpter
Sent: Friday, 1 June 2007 2:09 PM
To: valentina-studio at lists.macserve.net
Subject: RE: VStudio - make and existing field the primary key?
When I drop the primary key the function also mistakenly drops the Unique
Attribute
In VStudio as well. The DB is OK just VStudio.
-----Original Message-----
From: valentina-studio-bounces at lists.macserve.net
[mailto:valentina-studio-bounces at lists.macserve.net] On Behalf Of Barry G.
Sumpter
Sent: Friday, 1 June 2007 2:03 PM
To: valentina-studio at lists.macserve.net
Subject: RE: VStudio - make and existing field the primary key?
When I execute a Valentina Dump of a test database I get this:
CREATE TABLE "Test" (
"Test" LONG NOT NULL UNIQUE INDEXED);
I believe is should be this:
CREATE TABLE "Test" (
"Test" LONG PRIMARY KEY NOT NULL UNIQUE INDEXED);
Is the dump missing the Primary Key?
-----Original Message-----
From: Barry G. Sumpter [mailto:BarrySum at BigPond.Net.AU]
Sent: Friday, 1 June 2007 1:29 PM
To: 'Barry G. Sumpter'; valentina-studio at lists.macserve.net
Subject: RE: VStudio - make and existing field the primary key?
If there is an existing Primary Key (PK) then you must remove the primary
key to have any other candidates.
I can remove the primary key notation on a field - VStudio errors out and
any subsequent attempt to create a primary key errors out in the same way.
I Believe, the existing field has to be Long, Unique, indexed, and NOT NULL
to be a candidate.
And the existing data must match the Unique attribute. i.e. no duplicate
data.
-----Original Message-----
From: Barry G. Sumpter [mailto:BarrySum at BigPond.Net.AU]
Sent: Friday, 1 June 2007 12:53 PM
To: 'valentina-studio at lists.macserve.net'
Subject: RE: VStudio - make and existing field the primary key?
How do you make and existing field the primary key?
_______________________________________________
Valentina-studio mailing list
Valentina-studio at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina-studio
_______________________________________________
Valentina-studio mailing list
Valentina-studio at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina-studio
More information about the Valentina-studio
mailing list