Subject | Problem with GeneratorLinks |
---|---|
Author | helton_o |
Post date | 2002-05-15T13:54:31Z |
Hi all,
I have the following table:
CREATE TABLE IntContabil
(
Ano SMALLINT NOT NULL ,
IdContaCont INTEGER NOT NULL ,
ContaCont VARCHAR(18) NOT NULL ,
Descricao VARCHAR(25) NOT NULL ,
HistPad SMALLINT NOT NULL ,
CodReduzido VARCHAR(06) NOT NULL ,
PercSobreEvtos NUMERIC(5,2) NOT NULL ,
CredoraDevedora CHAR(1) NOT NULL ,
GlobalCCusto CHAR(1) NOT NULL ,
Evt1 SMALLINT NOT NULL
)
I would like the field "IdContaCont" incremented by the following
generator: TIB_Query.GeneratorLinks = 'IDCONTACONT=GEN_INTCONTABIL".
When i insert a new record i get the following in a TIB_Monitor:
'/*---'
'PREPARE STATEMENT'
'TR_HANDLE = 19553948'
'STMT_HANDLE = 19549896'
'SELECT GEN_ID ( GEN_INTCONTABIL, 1 )'
'FROM RDB$DATABASE'
'PLAN (RDB$DATABASE NATURAL)'
'FIELDS = [ Version 1 SQLd 1 SQLn 1'
' GEN_ID = 0 ]'
'SECONDS = 0,030'
'----*/'
'/*---'
'EXECUTE2 DSQL'
'TR_HANDLE = 19553948'
'STMT_HANDLE = 19549896'
'PARAMS = [ ]'
'FIELDS = [ Version 1 SQLd 1 SQLn 1'
' GEN_ID = 40 ]
'SELECT COUNT: 1
'SECONDS = 0,010'
'----*/'
Until here it's all rigth, but when i post the record i get:
'/*---'
'EXECUTE STATEMENT'
'TR_HANDLE = 19553948'
'STMT_HANDLE = 19545568'
'PARAMS = [ Version 1 SQLd 159 SQLn 159'
' INTCONTABIL.ANO = 2002'
' INTCONTABIL.IDCONTACONT = 0'
' INTCONTABIL.CONTACONT = '3333''
' INTCONTABIL.DESCRICAO = '33''
' INTCONTABIL.HISTPAD = 3'
' INTCONTABIL.CODREDUZIDO = '3'
' INTCONTABIL.PERCSOBREEVTOS = 3'
' INTCONTABIL.CREDORADEVEDORA = 'C'
' INTCONTABIL.GLOBALCCUSTO = 'G'
' INTCONTABIL.EVT1 = 1'
'SECONDS = 0,010'
'----*/'
As you can see, the generator used in the GeneratorLinks property
isn't assigned to the field "IdContaCont" !!
What i am missing ?
Helton
I have the following table:
CREATE TABLE IntContabil
(
Ano SMALLINT NOT NULL ,
IdContaCont INTEGER NOT NULL ,
ContaCont VARCHAR(18) NOT NULL ,
Descricao VARCHAR(25) NOT NULL ,
HistPad SMALLINT NOT NULL ,
CodReduzido VARCHAR(06) NOT NULL ,
PercSobreEvtos NUMERIC(5,2) NOT NULL ,
CredoraDevedora CHAR(1) NOT NULL ,
GlobalCCusto CHAR(1) NOT NULL ,
Evt1 SMALLINT NOT NULL
)
I would like the field "IdContaCont" incremented by the following
generator: TIB_Query.GeneratorLinks = 'IDCONTACONT=GEN_INTCONTABIL".
When i insert a new record i get the following in a TIB_Monitor:
'/*---'
'PREPARE STATEMENT'
'TR_HANDLE = 19553948'
'STMT_HANDLE = 19549896'
'SELECT GEN_ID ( GEN_INTCONTABIL, 1 )'
'FROM RDB$DATABASE'
'PLAN (RDB$DATABASE NATURAL)'
'FIELDS = [ Version 1 SQLd 1 SQLn 1'
' GEN_ID = 0 ]'
'SECONDS = 0,030'
'----*/'
'/*---'
'EXECUTE2 DSQL'
'TR_HANDLE = 19553948'
'STMT_HANDLE = 19549896'
'PARAMS = [ ]'
'FIELDS = [ Version 1 SQLd 1 SQLn 1'
' GEN_ID = 40 ]
'SELECT COUNT: 1
'SECONDS = 0,010'
'----*/'
Until here it's all rigth, but when i post the record i get:
'/*---'
'EXECUTE STATEMENT'
'TR_HANDLE = 19553948'
'STMT_HANDLE = 19545568'
'PARAMS = [ Version 1 SQLd 159 SQLn 159'
' INTCONTABIL.ANO = 2002'
' INTCONTABIL.IDCONTACONT = 0'
' INTCONTABIL.CONTACONT = '3333''
' INTCONTABIL.DESCRICAO = '33''
' INTCONTABIL.HISTPAD = 3'
' INTCONTABIL.CODREDUZIDO = '3'
' INTCONTABIL.PERCSOBREEVTOS = 3'
' INTCONTABIL.CREDORADEVEDORA = 'C'
' INTCONTABIL.GLOBALCCUSTO = 'G'
' INTCONTABIL.EVT1 = 1'
'SECONDS = 0,010'
'----*/'
As you can see, the generator used in the GeneratorLinks property
isn't assigned to the field "IdContaCont" !!
What i am missing ?
Helton