I found work around but may be there is easier way. Instead of what I showed above:
DataSet->SQL->Text = ReplaceSortOrder( DataSet->SQL->Text, OrderBy);
DataSet->Refresh();
i used
if( DataSet->QBEModified)
{
//Saving QBE values in array of Variants
Variant * v = new...
I am trying to change SQL in TOracleDataSet in runtime and it does not work with QBE. For example I have SQL
Select * from all_tables
I do QBE and TOracleDataSet changes SQL to
select * from all_tables
where (OWNER = 'SYS')
/* Modified for QBE */
Now in code I add new line,something like...
My users want to have a column that shows row number (mostly for export in MS Excel). ROWNUM on server side does not work with ORDER BY. Is there a way to make it? May be calculated field some how?
Marko, All
I did a simple test (C++ Builder):
start = TDateTime::CurrentDateTime();
DataSet->Open();
while( !DataSet->Eof)
{
for( int i =0; iFields->Count; i++)
switch( DataSet->Fields->Fields[i]->DataType ){
ftString :
ftSmallint ...
You can query omething like that
select COLUMN_POSITION, COLUMN_NAME from
sys.all_ind_columns c
where c.index_name =
( SELECT MIN( index_name) FROM sys.all_indexes I WHERE I.OWNER='OWNER' AND I.table_name='TABLE_NAME' and i.uniqueness='UNIQUE')
ORDER BY COLUMN_POSITION
[This message has been...
// Enter into QBE mode
OracleDateSet1->QBEMode=true;
// do someting ...
// decided to cancel QBE like in OracleNavigator
OracleDateSet1->RestoreOldQBE_orSomethingLikeThis(); //???
Is there any way to do it in runtime programmatically?
[This message has been edited by dananiev (edited 10 October...