Hi, Lao
It works. I cannot reproduce the error.
Please, describe your actions in details (the whole code list) and the scripts for creating tables.
fetchall to false and queryrecount to true for postgresql
Re: fetchall to false and queryrecount to true for postgresql
happy new year,
i do what Alexp sayd:
now i create a project with 2 uniquery and one memo(users enter sql requests in this memo)
the uniquerys havent now defaults specificoptions fetchall=false and queryreccount=true;
the first uniquery just select data in the table and it is open(select * from A).
If in the second uniquery i make a mistake for exemple in table name( select * from Bx) instead of ( select * from B) i receive message'relation Bx does not exists'.
i correct the sql and when open the query i receive the message 'current transaction is aborted, commands ignored until end of transaction block'.
i don't use transaction.
maybe i need to change something more in src for fetchall like isfetchall or nonblocking.
please help me.
thanks
i do what Alexp sayd:
and :constructor TDADataSetOptions.Create(Owner: TCustomDADataSet);
begin
inherited Create;
FOwner := Owner;
SetFieldsReadOnly := True;
RequiredFields := True;
StrictUpdate := True;
TrimFixedChar := True;
LongStrings := True;
FlatBuffers := False;
RemoveOnRefresh := True;
UpdateBatchSize := 1;
QueryRecCount := True;
end;
and:FDataSetOptions.Add(TBooleanOption.Create('FetchAll', prFetchAll, [TPgSQLRecordSet], FALSE));
....................
TCustomDADataSet(FUpdateQuery).Options.SetEmptyStrToNull := FDataSet.Options.SetEmptyStrToNull;
TCustomDADataSet(FUpdateQuery).Options.FlatBuffers := True;
TCustomDADataSet(FUpdateQuery).Options.QueryRecCount := False; //<-add this line
now i create a project with 2 uniquery and one memo(users enter sql requests in this memo)
the uniquerys havent now defaults specificoptions fetchall=false and queryreccount=true;
the first uniquery just select data in the table and it is open(select * from A).
If in the second uniquery i make a mistake for exemple in table name( select * from Bx) instead of ( select * from B) i receive message'relation Bx does not exists'.
i correct the sql and when open the query i receive the message 'current transaction is aborted, commands ignored until end of transaction block'.
i don't use transaction.
maybe i need to change something more in src for fetchall like isfetchall or nonblocking.
please help me.
thanks
Re: fetchall to false and queryrecount to true for postgresql
Hello,
The specified problem doesn't occur after performing the described steps. Please try to reproduce the problem on the latest UniDAC version 4.6.11
The specified problem doesn't occur after performing the described steps. Please try to reproduce the problem on the latest UniDAC version 4.6.11
Re: fetchall to false and queryrecount to true for postgresql
Hi,
i try with latest unidac and i have same problem:
1) don't close application after open uniquery with bad table name.
2)don't change fetchall = false in code(it's set by default with changes in src)
because if i do uniquery1.specificoptions['Fetchall']:='False' before opening it, everything is ok.
Regrads
i try with latest unidac and i have same problem:
1) don't close application after open uniquery with bad table name.
2)don't change fetchall = false in code(it's set by default with changes in src)
because if i do uniquery1.specificoptions['Fetchall']:='False' before opening it, everything is ok.
Regrads
Re: fetchall to false and queryrecount to true for postgresql
hi,
the problem occur only if the first uniquery is open in design time;
Don't close it when the programm is running, and try with the second uniquery
first to select in a bad table name, and second in t a good table name
between the 2 tests don't close programm (use memo to change uniquery2 sql)
I am sorry my english is pour
Regrads
the problem occur only if the first uniquery is open in design time;
Don't close it when the programm is running, and try with the second uniquery
first to select in a bad table name, and second in t a good table name
between the 2 tests don't close programm (use memo to change uniquery2 sql)
I am sorry my english is pour
Regrads
Re: fetchall to false and queryrecount to true for postgresql
Hello,
To make your code work, you should apply your changes before components installation and build UniDAC using the make.bat file locating in the ..\Source\DelphiXX directory, then copy the created bpl to the System32 directory (from the ..\bin\DelphiXX directory), and install from the Components->Install Packages menu (you can read more detailed manual in the ReadMeSrc.html file)
To make your code work, you should apply your changes before components installation and build UniDAC using the make.bat file locating in the ..\Source\DelphiXX directory, then copy the created bpl to the System32 directory (from the ..\bin\DelphiXX directory), and install from the Components->Install Packages menu (you can read more detailed manual in the ReadMeSrc.html file)