Fetch rows from OraQuery
Fetch rows from OraQuery
OraQuery1.FetchAll := False;
OraQuery1.FetchRows := 25;
OraQuery1.Open;
How send command fetch next rows for OraQuery? (without OraQuery1.Next because they have blocked dbgrid fro user) Like MemTableEh1.FetchRecords(100) or MemTableEh1.FetchRecords(-1) (for fetch all records)
OraQuery1.FetchRows := 25;
OraQuery1.Open;
How send command fetch next rows for OraQuery? (without OraQuery1.Next because they have blocked dbgrid fro user) Like MemTableEh1.FetchRecords(100) or MemTableEh1.FetchRecords(-1) (for fetch all records)
Re: Fetch rows from OraQuery
hello,
To retrieve the next piece of data, you can use the MoveBy method
To retrieve the next piece of data, you can use the MoveBy method
Code: Select all
OraQuery1.MoveBy(OraQuery1.FetchRows);Re: Fetch rows from OraQuery
But this command move current recno and that change dbgrid state if then state in dsinsert/dsedit (it's problem for DisableControls - save recno - move - load recno - EnableControls) it will prevent the user.
Re: Fetch rows from OraQuery
1) Is there any way for local sorting in TOraQuery without fetch all records? (and without dbgrid functions)
2) I try using MemTableEh for local sorting but content your hack field types (ftBFile, ftLabel, ftOraTimeStamp, ftIntervalYM , ftIntervalDS, ftOraTimeStampTZ, ftOraTimeStampLTZ, ftNumber, ftXML) in TOraQuery prevents this.
How I can help MemTableEh understand this datatypes?
3)
for i := 0 to DBGridEh1.Columns.Count - 1 do
DBGridEh1.Columns.Field.DataType // return out of bound data type
2) I try using MemTableEh for local sorting but content your hack field types (ftBFile, ftLabel, ftOraTimeStamp, ftIntervalYM , ftIntervalDS, ftOraTimeStampTZ, ftOraTimeStampLTZ, ftNumber, ftXML) in TOraQuery prevents this.
How I can help MemTableEh understand this datatypes?
3)
for i := 0 to DBGridEh1.Columns.Count - 1 do
DBGridEh1.Columns.Field.DataType // return out of bound data type
Re: Fetch rows from OraQuery
hello,
In TMemTableEh there is a data retrieving engine implemented different from the one that is implemented in our components, therefore there is no method similar to FetchRecords, with using of which the cursor doesn't move by the DataSet when retrieving the new data.
For filtering data we retrive all the records from the table, therefore it is impossible to use a filter without retrieving of all the data in our components.
To have an ability to work with such types, you should use Data Type Mapping, i.e. map our inner types to Delph types. You can find the detailed information and samples of Data Type Mapping in the help. For example, for ftOraTimeStamp you can use the following rule:
or set this rule in the OraQuery dialog on the Data Type Mapping tab, specifying in the DataBase field the type and Field Type values of TimeStamp
In TMemTableEh there is a data retrieving engine implemented different from the one that is implemented in our components, therefore there is no method similar to FetchRecords, with using of which the cursor doesn't move by the DataSet when retrieving the new data.
For filtering data we retrive all the records from the table, therefore it is impossible to use a filter without retrieving of all the data in our components.
To have an ability to work with such types, you should use Data Type Mapping, i.e. map our inner types to Delph types. You can find the detailed information and samples of Data Type Mapping in the help. For example, for ftOraTimeStamp you can use the following rule:
Code: Select all
OraQuery1.DataTypeMap.AddDBTypeRule(oraTimeStamp, ftTimeStamp);Re: Fetch rows from OraQuery
I'm try
// raise error Unsupported field type: 41.
OraQuery1.DataTypeMap.AddDBTypeRule(ftIntervalDS, ftOraInterval);
// Unsupported database type: 100.
OraQuery1.DataTypeMap.AddDBTypeRule(ftBFile, ftBlob);
How to do right?
// raise error Unsupported field type: 41.
OraQuery1.DataTypeMap.AddDBTypeRule(ftIntervalDS, ftOraInterval);
// Unsupported database type: 100.
OraQuery1.DataTypeMap.AddDBTypeRule(ftBFile, ftBlob);
How to do right?
Re: Fetch rows from OraQuery
May be you add capability local sorting and filtering only for fetched rows?
Or may be it's possible if connect TVirtualTable? (but I have not found a way to)
Or may be it's possible if connect TVirtualTable? (but I have not found a way to)
Last edited by sinys on Tue 14 Aug 2012 09:20, edited 1 time in total.
Re: Fetch rows from OraQuery
Code: Select all
OraQuery1.DataTypeMap.AddDBTypeRule(oraBFile, ftBlob); // Unsupported field type: 15
OraQuery1.DataTypeMap.AddDBTypeRule(oraBFile, ftOraBlob); // Unsupported field type: 30Code: Select all
OraQuery1.DataTypeMap.AddDBTypeRule(oraBFile, ftVarBytes);
OraQuery1.Open; // Unsupported data type mapping: "BFile" to "VarBytes"Re: Fetch rows from OraQuery
Please show example for BFile and XML data types!
Re: Fetch rows from OraQuery
hello,
In the AddDBTypeRule, the first parameter should be one of the following our inner field types:
oraChar, oraVarchar2, oraNChar, oraNVarchar2, oraNumber, oraBinaryFloat, oraBinaryDouble, oraDate, oraTimeStamp, oraTimeStampWithTimeZone,
oraTimeStampWithLocalTimeZone, oraBlob, oraClob, oraNClob, oraBFile, oraLong, oraRaw, oraLongRaw, oraRowID, oraURowID; that are declared in the OraDataTypeMap module.
The second parameter - one of the Delphi field types declared in the DB module in TFieldType.
If you are loading data from the DataSet in VirtualTable with the help of the Assign method, all the data from the DB will be loaded, independing on the settings of FetchAll of the used DataSet. Therefore sorting in VirtualTable will occur by all the data.
At the moment, mapping of such Oracle types as XMLTYPE and BFfile is not implemented, we review the possibility of adding such feature in one of the next versions.
In the AddDBTypeRule, the first parameter should be one of the following our inner field types:
oraChar, oraVarchar2, oraNChar, oraNVarchar2, oraNumber, oraBinaryFloat, oraBinaryDouble, oraDate, oraTimeStamp, oraTimeStampWithTimeZone,
oraTimeStampWithLocalTimeZone, oraBlob, oraClob, oraNClob, oraBFile, oraLong, oraRaw, oraLongRaw, oraRowID, oraURowID; that are declared in the OraDataTypeMap module.
The second parameter - one of the Delphi field types declared in the DB module in TFieldType.
If you are loading data from the DataSet in VirtualTable with the help of the Assign method, all the data from the DB will be loaded, independing on the settings of FetchAll of the used DataSet. Therefore sorting in VirtualTable will occur by all the data.
At the moment, mapping of such Oracle types as XMLTYPE and BFfile is not implemented, we review the possibility of adding such feature in one of the next versions.