Subject | Integ_114 Constrait Violation |
---|---|
Author | Gaurav Sood |
Post date | 2006-08-02T07:21:50Z |
Hi All,
I am using a query to insert a number of fields into a database. The table
has several fields (some Smallint, string, and integer values). I also
previously tried using a D_BOOLEAN domain defined as Char(1). Even when the
domain was defined to CHECK (VALUE IN ('T', 'F')), with the field declared
as 'NOT NULL DEFAULT 'F', I get this Unique or Primary key Constraint
INTEG_114 violation on my table.
Query for assigning values is something like:
NewTranscriptQuery.Field[4].asboolean or .assmallint = 'F' or 0;
ExecSQL;
Close;
(sorry don't have code with me at the moment so syntax may be wrong).
I tried using ISQL to re do the inserts and don't know what is wrong, except
when I try inserting with a wrong field type, ie F instead of 'F', it gives
me a violation. (As I found out that the INTEG_123 is only for the primary
key).
The Delphi application within which this is nested, is using calls to this
function (DisplayUtterances(TStringGrid : utteranceWords) ) to insert to my
table. The application manages to insert one row, after which it fails with
above error.
A separate file which does a similar task with different table succeeds in
inserting rows. I cant tell what it is I am doing differently. The file that
works, changes the ActiveControl to the first row of the Utterances string
grid (after initially displaying the utterances in the first
UtteranceStringGrid) then it inserts the utterances for that row into a
TStringGrid for editing (and a database table). On closing this separate
editing window, all 'unEdited' utterances are inserted into a table.
The initial data is stored in a Utterances (ID integer, Utterance String)
table and is ported to a MorphoWords( Transcriptionid, Utteranceidx ,
Utteranceidx, Orthographic String, Pronoun smallint,
<various_characteristics> ) table where each word is separately inserted.
Any help would be muchly appreciated! Thanks in advance,
Regards,
Gaurav
--
Analyst
B. Engineering, B. IT
A.N.U (2004)
M: +61 401 409 620
H: +61 3 9376 8580
"In life, always do right. This will gratify some people and astonish the
rest."
� Mark Twain
[Non-text portions of this message have been removed]
I am using a query to insert a number of fields into a database. The table
has several fields (some Smallint, string, and integer values). I also
previously tried using a D_BOOLEAN domain defined as Char(1). Even when the
domain was defined to CHECK (VALUE IN ('T', 'F')), with the field declared
as 'NOT NULL DEFAULT 'F', I get this Unique or Primary key Constraint
INTEG_114 violation on my table.
Query for assigning values is something like:
NewTranscriptQuery.Field[4].asboolean or .assmallint = 'F' or 0;
ExecSQL;
Close;
(sorry don't have code with me at the moment so syntax may be wrong).
I tried using ISQL to re do the inserts and don't know what is wrong, except
when I try inserting with a wrong field type, ie F instead of 'F', it gives
me a violation. (As I found out that the INTEG_123 is only for the primary
key).
The Delphi application within which this is nested, is using calls to this
function (DisplayUtterances(TStringGrid : utteranceWords) ) to insert to my
table. The application manages to insert one row, after which it fails with
above error.
A separate file which does a similar task with different table succeeds in
inserting rows. I cant tell what it is I am doing differently. The file that
works, changes the ActiveControl to the first row of the Utterances string
grid (after initially displaying the utterances in the first
UtteranceStringGrid) then it inserts the utterances for that row into a
TStringGrid for editing (and a database table). On closing this separate
editing window, all 'unEdited' utterances are inserted into a table.
The initial data is stored in a Utterances (ID integer, Utterance String)
table and is ported to a MorphoWords( Transcriptionid, Utteranceidx ,
Utteranceidx, Orthographic String, Pronoun smallint,
<various_characteristics> ) table where each word is separately inserted.
Any help would be muchly appreciated! Thanks in advance,
Regards,
Gaurav
--
Analyst
B. Engineering, B. IT
A.N.U (2004)
M: +61 401 409 620
H: +61 3 9376 8580
"In life, always do right. This will gratify some people and astonish the
rest."
� Mark Twain
[Non-text portions of this message have been removed]