Subject | Incremental searching on integers |
---|---|
Author | Ettienne du Plessis |
Post date | 2004-05-04T08:32:24Z |
hi all
We have a query where the custid is an integer. We are using a
TIB_incSearch.
We have ordering and searchlinks in place for a number of columns but it
only searches on varchar columns and not on any integer columns.
Any suggestions
thanks
Ettienne du Plessis
Senior Analyst
First National Battery CO (PTY) LTD
Tel : +27 11 741-3600
Fax : +27 11 421-2739
Web : www.battery.co.za
-----Original Message-----
From: jwharton@... [mailto:jwharton@...]
Sent: 04 May 2004 03:28
To: Delmar
Cc: ibobjects@yahoogroups.com
Subject: Re: [IBO] lock conflict on no wait transaction ...?
In short, design your application in such a way that you don't update the
same record in different transactions both open
simultaneously.
This is actually a very involved subject and it depends greatly on many
factors specific to your requirements, something
we know very little about as yet.
Regards,
Jason Wharton
www.ibobjects.com
----------------------------------------------------------------------------
----
----------------------------------------------------------------------------
----
Hi everyone...
How to solve this problem?
-------------------------
ISC ERROR CODE:335544345
lock conflict on no wait transaction deadlock update conflicts whit
concurrent update
STATMENT:
TIB_Statement:
"<TApplication>.dmq.Qconta.IBOqrconta.<TIB_UpdateSQL>.<TIB_Statment>."
STATEMENT:
-----------------------------------
More about what Im using:
D7 >> IBO 4.2.Ie >> Firebird 1.5 Final
Dataset compatible components (TIBODATASET)
Below TIBOquery have its IB_Transaction property=dmtran.tranQdocumento
dmq.Qdocumento
dmq.Qdocumentoitem
dmq.Qreceitadespesa
dmq.Qreceitadespesaitem
dmq.Qmovimento
dmq.Qconta
except dmq.Qpegavalorconta >> IB_Transaction
property=dmtran.tranQpegavalorconta
Some properties of tranQdocumento (TIBOTransaction) and
dmtran.tranQpegavalorconta (TIBOTransaction)
AutoCommit=True
Isolation=tiCommitted
LockWait=False
ServerAutoCommit=False
-----------------------
Code:
dmtran.tranQdocumento.StartTransaction;
try
dmq.Qdocumento.post;
for linha:=0 to stringgrid2.Rowcount -1 do
begin
if not dmq.SPdocumentoitem.Prepared then
dmq.SPdocumentoitem.Prepare;
dmq.SPdocumentoitem.ExecProc;
dmq.Qdocumentoitem.ParamByName('codigo').AsString:=dmq.SPdocumentoitem.Param
ByName('ID').AsString;
dmq.Qdocumentoitem.ParamByName('codproduto').AsString:=stringgrid2.Cells[0,l
inha];
dmq.Qdocumentoitem.ParamByName('coddocumento').AsString:=dmq.QdocumentoCODIG
O.AsString;
dmq.Qdocumentoitem.ParamByName('quantidade').AsString:=stringgrid2.Cells[3,l
inha];
dmq.Qdocumentoitem.ParamByName('valor').AsString:=stringgrid2.Cells[4,linha]
;
dmq.Qdocumentoitem.ParamByName('numero').AsString:=stringgrid2.Cells[2,linha
];
dmq.Qdocumentoitem.ParamByName('subtotal').AsString:=removeponto(stringgrid2
.Cells[5,linha]);
dmq.Qdocumentoitem.ParamByName('obs').AsString:=stringgrid2.Cells[6,linha];
dmq.Qdocumentoitem.ParamByName('codcategoria').AsString:=removeponto(stringg
rid2.Cells[9,linha]);
dmq.Qdocumentoitem.ParamByName('ano').AsString:=stringgrid2.Cells[8,linha];
if not dmq.Qdocumentoitem.Prepared then
dmq.Qdocumentoitem.Prepare;
dmq.Qdocumentoitem.ExecSQL;
end;
lanca_receitaDespesa_receitadespesaitem_movimento_conta; //call to procedure
dmq.Qreceitadespesa.ExecSQL;
dmq.Qreceitadespesaitem.ExecSQL;
dmq.Qmovimento.ExecSQL;
dmtran.tranQdocumento.Commit;
except
on E: Exception do
begin
dmtran.tranQdocumento.Rollback;
showmessage(E.Message);
end;
end;
procedure
Tndocumento.lanca_receitaDespesa_receitadespesaitem_movimento_conta;
begin
if not dmq.SPreceitadespesa.Prepared then
dmq.SPreceitadespesa.Prepare;
dmq.SPreceitadespesa.ExecProc;
if not dmq.SPidreceita.Prepared then
dmq.SPidreceita.Prepare;
dmq.SPidreceita.ExecProc;
dmq.Qreceitadespesa.ParamByName('CODIGO').AsString:=dmq.SPreceitadespesa.Par
amByName('ID').AsString;
dmq.Qreceitadespesa.ParamByName('DATA').AsString:=nprincipal.datahora;
dmq.Qreceitadespesa.ParamByName('CODTITULAR').AsString:=dmc.Qdblookuptitular
consultaCODIGO.AsString;
dmq.Qreceitadespesa.ParamByName('CODTIPODEBITOCREDITO').AsString:='1';
dmq.Qreceitadespesa.ParamByName('TIPO').AsString:='C';
dmq.Qreceitadespesa.ParamByName('TOTAL').AsString:=dmq.QdocumentoTOTAL.AsStr
ing;
dmq.Qreceitadespesa.ParamByName('IDRECEITADESPESA').AsString:=dmq.SPidreceit
a.ParamByName('ID').AsString;
if (radiogroup1.ItemIndex=0) or (radiogroup1.ItemIndex=1) then //gera o
id do recibo
begin
if not dmq.SPidrecibo.Prepared then
dmq.SPidrecibo.Prepare;
dmq.SPidrecibo.ExecProc;
dmq.Qreceitadespesa.ParamByName('IDRECIBO').AsString:=dmq.SPidrecibo.ParamBy
Name('ID').AsString;
end
else
dmq.Qreceitadespesa.ParamByName('IDRECIBO').AsVariant:=null;
if not dmq.SPreceitadespesaitem.Prepared then
dmq.SPreceitadespesaitem.Prepare;
dmq.SPreceitadespesaitem.ExecProc;
dmq.Qreceitadespesaitem.ParamByName('CODIGO').AsString:=dmq.SPreceitadespesa
item.ParamByName('ID').AsString;
dmq.Qreceitadespesaitem.ParamByName('CODRECEITADESPESA').AsString:=dmq.Qrece
itadespesa.ParamByName('C
ODIGO').AsString;
dmq.Qreceitadespesaitem.ParamByName('CODDOCUMENTO').AsString:=dmq.Qdocumento
CODIGO.AsString;
if not dmq.SPmovimento.Prepared then
dmq.SPmovimento.Prepare;
dmq.SPmovimento.ExecProc;
dmq.Qmovimento.ParamByName('CODIGO').AsString:=dmq.SPmovimento.ParamByName('
ID').AsString;
dmq.Qmovimento.ParamByName('VALOR').AsString:=dmq.QdocumentoTOTAL.AsString;
dmq.Qpegavalorconta.Close;
dmq.Qpegavalorconta.ParamByName('pcodigo').AsString:=dmq.QcontaCODIGO.AsStri
ng;
dmq.Qpegavalorconta.Open;
dmq.Qmovimento.ParamByName('SALDOANTERIOR').AsString:=dmq.QpegavalorcontaVAL
OR.AsString;
dmq.Qconta.edit;
dmq.QcontaVALOR.Value:=dmq.QpegavalorcontaVALOR.Value+dmq.QdocumentoTOTAL.Va
lue;
dmq.Qconta.Post;
dmq.Qpegavalorconta.Close;
dmq.Qmovimento.ParamByName('SALDOATUAL').AsString:=dmq.QcontaVALOR.AsString;
dmq.Qmovimento.ParamByName('CODCONTA').AsString:=dmQ.QcontaCODIGO.AsString;
dmq.Qmovimento.ParamByName('CODRECEITADESPESA').AsString:=dmq.Qreceitadespes
a.ParamByName('CODIGO').
AsString;
dmq.Qmovimento.ParamByName('DATA').AsString:=dmq.Qreceitadespesa.ParamByName
('DATA').AsString
end;
------------------------
The problem happens when I try to launch almost simultaneously from
two pcs.
What is wrong or badly configured?
thanks.
[Non-text portions of this message have been removed]
___________________________________________________________________________
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
___________________________________________________________________________
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
We have a query where the custid is an integer. We are using a
TIB_incSearch.
We have ordering and searchlinks in place for a number of columns but it
only searches on varchar columns and not on any integer columns.
Any suggestions
thanks
Ettienne du Plessis
Senior Analyst
First National Battery CO (PTY) LTD
Tel : +27 11 741-3600
Fax : +27 11 421-2739
Web : www.battery.co.za
-----Original Message-----
From: jwharton@... [mailto:jwharton@...]
Sent: 04 May 2004 03:28
To: Delmar
Cc: ibobjects@yahoogroups.com
Subject: Re: [IBO] lock conflict on no wait transaction ...?
In short, design your application in such a way that you don't update the
same record in different transactions both open
simultaneously.
This is actually a very involved subject and it depends greatly on many
factors specific to your requirements, something
we know very little about as yet.
Regards,
Jason Wharton
www.ibobjects.com
----------------------------------------------------------------------------
----
----------------------------------------------------------------------------
----
Hi everyone...
How to solve this problem?
-------------------------
ISC ERROR CODE:335544345
lock conflict on no wait transaction deadlock update conflicts whit
concurrent update
STATMENT:
TIB_Statement:
"<TApplication>.dmq.Qconta.IBOqrconta.<TIB_UpdateSQL>.<TIB_Statment>."
STATEMENT:
-----------------------------------
More about what Im using:
D7 >> IBO 4.2.Ie >> Firebird 1.5 Final
Dataset compatible components (TIBODATASET)
Below TIBOquery have its IB_Transaction property=dmtran.tranQdocumento
dmq.Qdocumento
dmq.Qdocumentoitem
dmq.Qreceitadespesa
dmq.Qreceitadespesaitem
dmq.Qmovimento
dmq.Qconta
except dmq.Qpegavalorconta >> IB_Transaction
property=dmtran.tranQpegavalorconta
Some properties of tranQdocumento (TIBOTransaction) and
dmtran.tranQpegavalorconta (TIBOTransaction)
AutoCommit=True
Isolation=tiCommitted
LockWait=False
ServerAutoCommit=False
-----------------------
Code:
dmtran.tranQdocumento.StartTransaction;
try
dmq.Qdocumento.post;
for linha:=0 to stringgrid2.Rowcount -1 do
begin
if not dmq.SPdocumentoitem.Prepared then
dmq.SPdocumentoitem.Prepare;
dmq.SPdocumentoitem.ExecProc;
dmq.Qdocumentoitem.ParamByName('codigo').AsString:=dmq.SPdocumentoitem.Param
ByName('ID').AsString;
dmq.Qdocumentoitem.ParamByName('codproduto').AsString:=stringgrid2.Cells[0,l
inha];
dmq.Qdocumentoitem.ParamByName('coddocumento').AsString:=dmq.QdocumentoCODIG
O.AsString;
dmq.Qdocumentoitem.ParamByName('quantidade').AsString:=stringgrid2.Cells[3,l
inha];
dmq.Qdocumentoitem.ParamByName('valor').AsString:=stringgrid2.Cells[4,linha]
;
dmq.Qdocumentoitem.ParamByName('numero').AsString:=stringgrid2.Cells[2,linha
];
dmq.Qdocumentoitem.ParamByName('subtotal').AsString:=removeponto(stringgrid2
.Cells[5,linha]);
dmq.Qdocumentoitem.ParamByName('obs').AsString:=stringgrid2.Cells[6,linha];
dmq.Qdocumentoitem.ParamByName('codcategoria').AsString:=removeponto(stringg
rid2.Cells[9,linha]);
dmq.Qdocumentoitem.ParamByName('ano').AsString:=stringgrid2.Cells[8,linha];
if not dmq.Qdocumentoitem.Prepared then
dmq.Qdocumentoitem.Prepare;
dmq.Qdocumentoitem.ExecSQL;
end;
lanca_receitaDespesa_receitadespesaitem_movimento_conta; //call to procedure
dmq.Qreceitadespesa.ExecSQL;
dmq.Qreceitadespesaitem.ExecSQL;
dmq.Qmovimento.ExecSQL;
dmtran.tranQdocumento.Commit;
except
on E: Exception do
begin
dmtran.tranQdocumento.Rollback;
showmessage(E.Message);
end;
end;
procedure
Tndocumento.lanca_receitaDespesa_receitadespesaitem_movimento_conta;
begin
if not dmq.SPreceitadespesa.Prepared then
dmq.SPreceitadespesa.Prepare;
dmq.SPreceitadespesa.ExecProc;
if not dmq.SPidreceita.Prepared then
dmq.SPidreceita.Prepare;
dmq.SPidreceita.ExecProc;
dmq.Qreceitadespesa.ParamByName('CODIGO').AsString:=dmq.SPreceitadespesa.Par
amByName('ID').AsString;
dmq.Qreceitadespesa.ParamByName('DATA').AsString:=nprincipal.datahora;
dmq.Qreceitadespesa.ParamByName('CODTITULAR').AsString:=dmc.Qdblookuptitular
consultaCODIGO.AsString;
dmq.Qreceitadespesa.ParamByName('CODTIPODEBITOCREDITO').AsString:='1';
dmq.Qreceitadespesa.ParamByName('TIPO').AsString:='C';
dmq.Qreceitadespesa.ParamByName('TOTAL').AsString:=dmq.QdocumentoTOTAL.AsStr
ing;
dmq.Qreceitadespesa.ParamByName('IDRECEITADESPESA').AsString:=dmq.SPidreceit
a.ParamByName('ID').AsString;
if (radiogroup1.ItemIndex=0) or (radiogroup1.ItemIndex=1) then //gera o
id do recibo
begin
if not dmq.SPidrecibo.Prepared then
dmq.SPidrecibo.Prepare;
dmq.SPidrecibo.ExecProc;
dmq.Qreceitadespesa.ParamByName('IDRECIBO').AsString:=dmq.SPidrecibo.ParamBy
Name('ID').AsString;
end
else
dmq.Qreceitadespesa.ParamByName('IDRECIBO').AsVariant:=null;
if not dmq.SPreceitadespesaitem.Prepared then
dmq.SPreceitadespesaitem.Prepare;
dmq.SPreceitadespesaitem.ExecProc;
dmq.Qreceitadespesaitem.ParamByName('CODIGO').AsString:=dmq.SPreceitadespesa
item.ParamByName('ID').AsString;
dmq.Qreceitadespesaitem.ParamByName('CODRECEITADESPESA').AsString:=dmq.Qrece
itadespesa.ParamByName('C
ODIGO').AsString;
dmq.Qreceitadespesaitem.ParamByName('CODDOCUMENTO').AsString:=dmq.Qdocumento
CODIGO.AsString;
if not dmq.SPmovimento.Prepared then
dmq.SPmovimento.Prepare;
dmq.SPmovimento.ExecProc;
dmq.Qmovimento.ParamByName('CODIGO').AsString:=dmq.SPmovimento.ParamByName('
ID').AsString;
dmq.Qmovimento.ParamByName('VALOR').AsString:=dmq.QdocumentoTOTAL.AsString;
dmq.Qpegavalorconta.Close;
dmq.Qpegavalorconta.ParamByName('pcodigo').AsString:=dmq.QcontaCODIGO.AsStri
ng;
dmq.Qpegavalorconta.Open;
dmq.Qmovimento.ParamByName('SALDOANTERIOR').AsString:=dmq.QpegavalorcontaVAL
OR.AsString;
dmq.Qconta.edit;
dmq.QcontaVALOR.Value:=dmq.QpegavalorcontaVALOR.Value+dmq.QdocumentoTOTAL.Va
lue;
dmq.Qconta.Post;
dmq.Qpegavalorconta.Close;
dmq.Qmovimento.ParamByName('SALDOATUAL').AsString:=dmq.QcontaVALOR.AsString;
dmq.Qmovimento.ParamByName('CODCONTA').AsString:=dmQ.QcontaCODIGO.AsString;
dmq.Qmovimento.ParamByName('CODRECEITADESPESA').AsString:=dmq.Qreceitadespes
a.ParamByName('CODIGO').
AsString;
dmq.Qmovimento.ParamByName('DATA').AsString:=dmq.Qreceitadespesa.ParamByName
('DATA').AsString
end;
------------------------
The problem happens when I try to launch almost simultaneously from
two pcs.
What is wrong or badly configured?
thanks.
[Non-text portions of this message have been removed]
___________________________________________________________________________
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
___________________________________________________________________________
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