guillermo88
Programmer
I have a form with 2 grids
Grid1 contains information about invoices
Grid2 contains transactions related to invoices
This form allows to look information by a column agent and column invoice No
The table Invoice has an index on agent + invoice_no
Table invoices have 23,000 records
Table Transactions is empty
In the init event I set the Search criteria to
Agent = ‘-9999’
cFilter = “Agent = ‘-9999’ ”
cOrderBy = “Agent”
mySQL = “SQL statement is SELECT * FROM invoices WHERE “ + cFilter + “ ORDER BY “ + cOrderBy
Grid1 recordsourcetype = 4
Grid1 recordsource = mySQL
In Init Event of the DE
thisform.Grid1.recordSource= “”
thisform.Grid2.recordSource=””
The problem that I am having is that the first time the SQL statement is run takes a long time. After that response time is very fast.
I tried already to put a valid value in Search Criteria Ex. Agent = ‘XBD’ and still takes time load, I see “running query” window
Again this only happens the first time a load the form.
Once I have the form open and I look for another Agent it runs fast.
Even after releasing the form and I reopen it again there is no problem.
It seems is the very first time.
Any input will be appreciated.
Thanks.
Grid1 contains information about invoices
Grid2 contains transactions related to invoices
This form allows to look information by a column agent and column invoice No
The table Invoice has an index on agent + invoice_no
Table invoices have 23,000 records
Table Transactions is empty
In the init event I set the Search criteria to
Agent = ‘-9999’
cFilter = “Agent = ‘-9999’ ”
cOrderBy = “Agent”
mySQL = “SQL statement is SELECT * FROM invoices WHERE “ + cFilter + “ ORDER BY “ + cOrderBy
Grid1 recordsourcetype = 4
Grid1 recordsource = mySQL
In Init Event of the DE
thisform.Grid1.recordSource= “”
thisform.Grid2.recordSource=””
The problem that I am having is that the first time the SQL statement is run takes a long time. After that response time is very fast.
I tried already to put a valid value in Search Criteria Ex. Agent = ‘XBD’ and still takes time load, I see “running query” window
Again this only happens the first time a load the form.
Once I have the form open and I look for another Agent it runs fast.
Even after releasing the form and I reopen it again there is no problem.
It seems is the very first time.
Any input will be appreciated.
Thanks.