Subject | POSTING DATA from a TIBOQUERY Field inhibits use of the Query fields. (with image) |
---|---|
Author | Delmar Wichnieski (Delta Corporation) |
Post date | 2006-11-02T19:06:09Z |
Hi All,
I have the same problem when my TiboQuery is in dsinsert state, but only
because my program have an IMAGE blob field 80 binary. If I don't load an
image, all right. But if I load an image, the record is inserted, saved in
database, but lost informations im my DBedits e DBgrid although the record
remain.
See my SQL Select
SELECT FIRST 1
CLIENTE.CODIGO
, CLIENTE.CLIENTE
, CLIENTE.CONTATO
, CLIENTE.TIPO
, CLIENTE.CNPJ
, CLIENTE.IE
, CLIENTE.CPF
, CLIENTE.CI
, CLIENTE.ENDERECO
, CLIENTE.COMPLEMENTO
, CLIENTE.CODBAIRRO
, CLIENTE.CODCIDADE
, CLIENTE.CEP
, CLIENTE.FONE
, CLIENTE.FAX
, CLIENTE.DESDE
, CLIENTE.ANIVERSARIO
, CLIENTE.CONTATO1
, CLIENTE.EMAIL1
, CLIENTE.MSN1
, CLIENTE.SKYPE1
, CLIENTE.FONECONTATO1
, CLIENTE.CONTATO2
, CLIENTE.EMAIL2
, CLIENTE.MSN2
, CLIENTE.SKYPE2
, CLIENTE.FONECONTATO2
, CLIENTE.LIMITEVALORFATUR
, CLIENTE.RESPFINANFATUR
, CLIENTE.FOTO
, CLIENTE.OBS
, BAIRRO.BAIRRO
, CIDADE.CIDADE
, CIDADE.UF
FROM CLIENTE
LEFT JOIN BAIRRO ON CLIENTE.CODBAIRRO=BAIRRO.CODIGO
LEFT JOIN CIDADE ON CLIENTE.CODCIDADE=CIDADE.CODIGO
ORDER BY CLIENTE.CODIGO
See my SLQ Insert:
INSERT INTO CLIENTE(
CODIGO,
CLIENTE,
CONTATO,
TIPO,
CNPJ,
IE,
CPF,
CI,
ENDERECO,
COMPLEMENTO,
CODBAIRRO,
CODCIDADE,
CEP,
FONE,
FAX,
DESDE,
ANIVERSARIO,
CONTATO1,
EMAIL1,
MSN1,
SKYPE1,
FONECONTATO1,
CONTATO2,
EMAIL2,
MSN2,
SKYPE2,
FONECONTATO2,
LIMITEVALORFATUR,
RESPFINANFATUR,
FOTO,
OBS)
VALUES (
:CODIGO,
:CLIENTE,
:CONTATO,
:TIPO,
:CNPJ,
:IE,
:CPF,
:CI,
:ENDERECO,
:COMPLEMENTO,
:CODBAIRRO,
:CODCIDADE,
:CEP,
:FONE,
:FAX,
:DESDE,
:ANIVERSARIO,
:CONTATO1,
:EMAIL1,
:MSN1,
:SKYPE1,
:FONECONTATO1,
:CONTATO2,
:EMAIL2,
:MSN2,
:SKYPE2,
:FONECONTATO2,
:LIMITEVALORFATUR,
:RESPFINANFATUR,
:FOTO,
:OBS)
Some configurations
isolation = tiCommitted
CommitAction=caInvalidateCursor
Autocommit = I Try with true and false
See example code
--------------------------------------------------
TRY
IBOTransaction1.StartTransaction;
IBOQUERY1.Post;
IBOTransaction1.Commit;
EXCEPT
END;
Thanks for Any help
Delmar Wichnieski
I have the same problem when my TiboQuery is in dsinsert state, but only
because my program have an IMAGE blob field 80 binary. If I don't load an
image, all right. But if I load an image, the record is inserted, saved in
database, but lost informations im my DBedits e DBgrid although the record
remain.
See my SQL Select
SELECT FIRST 1
CLIENTE.CODIGO
, CLIENTE.CLIENTE
, CLIENTE.CONTATO
, CLIENTE.TIPO
, CLIENTE.CNPJ
, CLIENTE.IE
, CLIENTE.CPF
, CLIENTE.CI
, CLIENTE.ENDERECO
, CLIENTE.COMPLEMENTO
, CLIENTE.CODBAIRRO
, CLIENTE.CODCIDADE
, CLIENTE.CEP
, CLIENTE.FONE
, CLIENTE.FAX
, CLIENTE.DESDE
, CLIENTE.ANIVERSARIO
, CLIENTE.CONTATO1
, CLIENTE.EMAIL1
, CLIENTE.MSN1
, CLIENTE.SKYPE1
, CLIENTE.FONECONTATO1
, CLIENTE.CONTATO2
, CLIENTE.EMAIL2
, CLIENTE.MSN2
, CLIENTE.SKYPE2
, CLIENTE.FONECONTATO2
, CLIENTE.LIMITEVALORFATUR
, CLIENTE.RESPFINANFATUR
, CLIENTE.FOTO
, CLIENTE.OBS
, BAIRRO.BAIRRO
, CIDADE.CIDADE
, CIDADE.UF
FROM CLIENTE
LEFT JOIN BAIRRO ON CLIENTE.CODBAIRRO=BAIRRO.CODIGO
LEFT JOIN CIDADE ON CLIENTE.CODCIDADE=CIDADE.CODIGO
ORDER BY CLIENTE.CODIGO
See my SLQ Insert:
INSERT INTO CLIENTE(
CODIGO,
CLIENTE,
CONTATO,
TIPO,
CNPJ,
IE,
CPF,
CI,
ENDERECO,
COMPLEMENTO,
CODBAIRRO,
CODCIDADE,
CEP,
FONE,
FAX,
DESDE,
ANIVERSARIO,
CONTATO1,
EMAIL1,
MSN1,
SKYPE1,
FONECONTATO1,
CONTATO2,
EMAIL2,
MSN2,
SKYPE2,
FONECONTATO2,
LIMITEVALORFATUR,
RESPFINANFATUR,
FOTO,
OBS)
VALUES (
:CODIGO,
:CLIENTE,
:CONTATO,
:TIPO,
:CNPJ,
:IE,
:CPF,
:CI,
:ENDERECO,
:COMPLEMENTO,
:CODBAIRRO,
:CODCIDADE,
:CEP,
:FONE,
:FAX,
:DESDE,
:ANIVERSARIO,
:CONTATO1,
:EMAIL1,
:MSN1,
:SKYPE1,
:FONECONTATO1,
:CONTATO2,
:EMAIL2,
:MSN2,
:SKYPE2,
:FONECONTATO2,
:LIMITEVALORFATUR,
:RESPFINANFATUR,
:FOTO,
:OBS)
Some configurations
isolation = tiCommitted
CommitAction=caInvalidateCursor
Autocommit = I Try with true and false
See example code
--------------------------------------------------
TRY
IBOTransaction1.StartTransaction;
IBOQUERY1.Post;
IBOTransaction1.Commit;
EXCEPT
END;
Thanks for Any help
Delmar Wichnieski
----- Original Message -----
From: "jack_engleman" <jengleman@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, October 23, 2006 3:15 PM
Subject: [IBO] POSTING DATA from a TIBOQUERY Field inhibits use of the Query
fields.
>I have converted my application over from BDE to IBOojects and I am
> running into a problem. I used data from my query after doing a post
> on the data. I then use the data in the Query for some other functions
> before finishing my task. With the BDE this worked OK. Now I notice
> that once I post the data, my data is not retained in the Query. In
> the example below Message 4 is OK and Message 5 is Blank( no data ).
>
> ShowMessage('4 Res OK: ' + FieldByName('PICKUPDATE').AsString);
> Post;
> ShowMessage('5 Res OK: ' + FieldByName('PICKUPDATE').AsString);
>
> Is there an option to allow this behavior or do I have to change my
> code. Changing the code could be a ardous process in that I have a
> lot of code and I would have to check every place I am doing a post to
> fix the problem.
>
> Thanks in Advance
>
> Jack Engleman
>
>
>
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>
>
> __________ Informação do NOD32 IMON 1.1825 (20061022) __________
>
> Esta mensagem foi verificada pelo NOD32 sistema antivírus
> http://www.eset.com.br
>
>