New To TMSTable
New To TMSTable
Hello,
We have an existing suite of Delphi 7 applications using a Pervasive Database, It uses Pervasive PDAC TTable replacement to access the DB.
A new customer has Insisted the product must now use MSSQL as its database so I have taken a quick look at TMSTable but have found some issues.
1) If I attempt to open a table "Ordered" (Using IndexFieldNames) it appears to hang while it appears to query the entire dataset even though there is an index on the fields. #
This is a big problem as some of the tables can contain tens of millions of records
2) Does TMSTable support SetRange or an equivelent.
3) If not an query components have to be used is it possible to refresh an individual row, or a range of rows in an existing result set.
thanks.
We have an existing suite of Delphi 7 applications using a Pervasive Database, It uses Pervasive PDAC TTable replacement to access the DB.
A new customer has Insisted the product must now use MSSQL as its database so I have taken a quick look at TMSTable but have found some issues.
1) If I attempt to open a table "Ordered" (Using IndexFieldNames) it appears to hang while it appears to query the entire dataset even though there is an index on the fields. #
This is a big problem as some of the tables can contain tens of millions of records
2) Does TMSTable support SetRange or an equivelent.
3) If not an query components have to be used is it possible to refresh an individual row, or a range of rows in an existing result set.
thanks.
1. To solve this problem use the TMSTable.OrderFields property to build ORDER BY clause of SQL statements. Also you can use the FetchAll property to increase perfomance on opening table.
2. SDAC does not support Range.
3. Use the RefreshRecord method to actualize field values for the current record.
2. SDAC does not support Range.
3. Use the RefreshRecord method to actualize field values for the current record.
I am unable to see the SQL that TMSTable uses.
However i can execute
SELECT TOP 10 * FROM dbo.TRANSACTIONS ORDER BY idLot
and it returns immediatley.
I now also have another issue.
I was asked to evaluate this project a few months ago and was called off due to other issues. Now I am back to look at it the trial period has just expired and I am unable to test any further. can this be extended?
However i can execute
SELECT TOP 10 * FROM dbo.TRANSACTIONS ORDER BY idLot
and it returns immediatley.
I now also have another issue.
I was asked to evaluate this project a few months ago and was called off due to other issues. Now I am back to look at it the trial period has just expired and I am unable to test any further. can this be extended?
Set the TMSTable.Debug property to True to display executing statement and all its parameters' values.
Also you can use the TMSQuery componentto execute your own query, like
Also you can use the TMSQuery componentto execute your own query, like
Code: Select all
SELECT TOP 10 * FROM dbo.TRANSACTIONS ORDER BY idLot
We can send you another SDAC trial build with extended trial period. If you need it, contact us by e-mail at dmitryg*devart*com.swright wrote:I was asked to evaluate this project a few months ago and was called off due to other issues. Now I am back to look at it the trial period has just expired and I am unable to test any further. can this be extended?
Thanks for the help and the extended Trial.
The table I am testing with has 1.1million records (simulation of approx 2 years of data in a real DB).
If I use the orderfields property it takes in excess of ten minutes to complete with fetchall=FALSE
In reality I am never going to present a dataset that large in a grid etc. But I do currently use multiple TTable type components to Insert/Change/Delete various rows (within a transaction). And will have to Rework/Rewrite this for MSSQL.
Can this only be achieved by using the "FilterSQL" to add a where clause, and would I need to add another TMSTable if I wanted to locate and update a record outside of the Filter?
Or Should It be done a different way?
regards
The table I am testing with has 1.1million records (simulation of approx 2 years of data in a real DB).
If I use the orderfields property it takes in excess of ten minutes to complete with fetchall=FALSE
In reality I am never going to present a dataset that large in a grid etc. But I do currently use multiple TTable type components to Insert/Change/Delete various rows (within a transaction). And will have to Rework/Rewrite this for MSSQL.
Can this only be achieved by using the "FilterSQL" to add a where clause, and would I need to add another TMSTable if I wanted to locate and update a record outside of the Filter?
Or Should It be done a different way?
regards
Replaced TMSTable with TMSQuery
Have it linked to datasource and datasource linked to TDBGrid.
Set FetchAll = false
SQL = SELECT TOP 10 * FROM TRANSACTIONS ORDER BY idLot
It returns the 10 records immediate
Set FetchAll = false
SQL = SELECT TOP 100000 FROM TRANSACTIONS ORDER BY idLot
Returns immediate and thumb is at bottom of grid at 25 records then
repositions as it fetches more.
Set FetchAll = false
SQL = SELECT TOP 200000 FROM TRANSACTIONS ORDER BY idLot
waits until query completes (approx 10 min).
Set FetchAll = false
SQL = SELECT * FROM TRANSACTIONS ORDER BY idLot
waits until query completes (approx 10 min).
Have it linked to datasource and datasource linked to TDBGrid.
Set FetchAll = false
SQL = SELECT TOP 10 * FROM TRANSACTIONS ORDER BY idLot
It returns the 10 records immediate
Set FetchAll = false
SQL = SELECT TOP 100000 FROM TRANSACTIONS ORDER BY idLot
Returns immediate and thumb is at bottom of grid at 25 records then
repositions as it fetches more.
Set FetchAll = false
SQL = SELECT TOP 200000 FROM TRANSACTIONS ORDER BY idLot
waits until query completes (approx 10 min).
Set FetchAll = false
SQL = SELECT * FROM TRANSACTIONS ORDER BY idLot
waits until query completes (approx 10 min).
Last edited by swright on Wed 30 Dec 2009 16:57, edited 1 time in total.