Subject | index unexpectedly deleted |
---|---|
Author | giorgisistemas |
Post date | 2010-09-21T20:15:05Z |
Hi, my problem is:
1) i have a program:
FACCPA - Invoice Header
DETFCC - Details of tax bill
DETFCA - Details of products purchased
the 3 with the following fields in common.
TIPCOM - Type of Proof
LETCOM - Letra
PTOCOM - Point of Sale
NROCOM - Number
CODPRC - Provider Id
Then I have as a primary key FACCPA:
tipcom, letcom, ptocom, nrocom, codprc
In a form of three tables show the following:
datafb.query_faccpa do with
begin
close;
SQL.Clear;
SQL.add ('select * from faccpa');
SQL.add ('order by feccon, letcom, ptocom, nrocom');
open;
end;
datafb.query_detfcc do with
begin
DataSource: = datafb.dsfaccpa;
SQL.text: = 'select * from detfcc';
SQL.Add ('where codprc =: codprc');
SQL.add ('and tipcom =: tipcom');
SQL.add ('and letcom =: letcom');
SQL.add ('and ptocom =: ptocom');
SQL.add ('and nrocom =: nrocom');
open;
datafb.query_detfca do with
begin
DataSource: = datafb.dsfaccpa;
SQL.text: = 'select * from detfca';
SQL.Add ('where codprc =: codprc');
SQL.add ('and tipcom =: tipcom');
SQL.add ('and letcom =: letcom');
SQL.add ('and ptocom =: ptocom');
SQL.add ('and nrocom =: nrocom');
open;
end;
the problem here, after making an amendment to a bill,
every so often get the error, INDEX DELETED UNEXPEDTEDLY is not long as I could
detect error handling is when I
Query_faccpa.active: = false;
Query_faccpa.active: = true;
To refresh the data in the grid. (DBGrid)
Another little thing.
2) It occurred to me sometime and add indexes to DETFCC DETFCA with the same
Primary Key fields to see if performance improved, this will help me be
fastest query?
thanks!
1) i have a program:
FACCPA - Invoice Header
DETFCC - Details of tax bill
DETFCA - Details of products purchased
the 3 with the following fields in common.
TIPCOM - Type of Proof
LETCOM - Letra
PTOCOM - Point of Sale
NROCOM - Number
CODPRC - Provider Id
Then I have as a primary key FACCPA:
tipcom, letcom, ptocom, nrocom, codprc
In a form of three tables show the following:
datafb.query_faccpa do with
begin
close;
SQL.Clear;
SQL.add ('select * from faccpa');
SQL.add ('order by feccon, letcom, ptocom, nrocom');
open;
end;
datafb.query_detfcc do with
begin
DataSource: = datafb.dsfaccpa;
SQL.text: = 'select * from detfcc';
SQL.Add ('where codprc =: codprc');
SQL.add ('and tipcom =: tipcom');
SQL.add ('and letcom =: letcom');
SQL.add ('and ptocom =: ptocom');
SQL.add ('and nrocom =: nrocom');
open;
datafb.query_detfca do with
begin
DataSource: = datafb.dsfaccpa;
SQL.text: = 'select * from detfca';
SQL.Add ('where codprc =: codprc');
SQL.add ('and tipcom =: tipcom');
SQL.add ('and letcom =: letcom');
SQL.add ('and ptocom =: ptocom');
SQL.add ('and nrocom =: nrocom');
open;
end;
the problem here, after making an amendment to a bill,
every so often get the error, INDEX DELETED UNEXPEDTEDLY is not long as I could
detect error handling is when I
Query_faccpa.active: = false;
Query_faccpa.active: = true;
To refresh the data in the grid. (DBGrid)
Another little thing.
2) It occurred to me sometime and add indexes to DETFCC DETFCA with the same
Primary Key fields to see if performance improved, this will help me be
fastest query?
thanks!