How migrate project from Delphi 7 to Delphi XE5?
-
- Posts: 11
- Joined: Tue 30 Nov 2010 04:17
How migrate project from Delphi 7 to Delphi XE5?
Hello.
I bought new version DevArt dbExpress driver for InterBase and want migrate my project from Delphi 7 to Delphi XE5.
But I see error in my code (code from DevArt Readme)
..............
const
coPrepared = TSQLConnectionOption(302); // boolean
.................
What unit do I need used now?
Where I can read any manuals about migration from DBXprese 2 to DBXpress 4?
Thanks
Vadim Mescheryakov
I bought new version DevArt dbExpress driver for InterBase and want migrate my project from Delphi 7 to Delphi XE5.
But I see error in my code (code from DevArt Readme)
..............
const
coPrepared = TSQLConnectionOption(302); // boolean
.................
What unit do I need used now?
Where I can read any manuals about migration from DBXprese 2 to DBXpress 4?
Thanks
Vadim Mescheryakov
Re: How migrate project from Delphi 7 to Delphi XE5?
You should assign parameter values to TSQLConnection in CodeGear RAD Studio XE5 at run time in this way:
You can find more details in Readme.html at: %DBXInterBase%\Readme.html
where %DBXInterBase% is the path to the installed dbExpress вriver for InterBase and Firebird.
Code: Select all
SQLConnection.Params.Values['Prepared'] := 'True';
where %DBXInterBase% is the path to the installed dbExpress вriver for InterBase and Firebird.
-
- Posts: 11
- Joined: Tue 30 Nov 2010 04:17
Re: How migrate project from Delphi 7 to Delphi XE5?
Thanks.ViktorV wrote:You should assign parameter values to TSQLConnection in CodeGear RAD Studio XE5 at run time in this way:
Next problem - Property TSQLQuery.TransactionLevel missing in Delphi XE5.
I use two transaction on some time (long ReadOnly for read all data and short Write for change data). How set transaction for execute query in DBExpress 4?
Thanks.
Vadim Mescheryakov
Re: How migrate project from Delphi 7 to Delphi XE5?
The similar question has already been discussed on our forum. Follow the link http://forums.devart.com/viewtopic.php? ... 068#p85190 for details.
-
- Posts: 11
- Joined: Tue 30 Nov 2010 04:17
Re: How migrate project from Delphi 7 to Delphi XE5?
I read this topicViktorV wrote:The similar question has already been discussed on our forum. Follow the link http://forums.devart.com/viewtopic.php? ... 068#p85190 for details.
How execute SQLQuery in transaction 1 or 2? How say Open Statement in transaction №1?tr.TransactionID := 1;
What replace SQLQuery.TransactionLevel?
I not found this information in ex[amples and documentation.
Thanks
Vadim Mescheryakov
Re: How migrate project from Delphi 7 to Delphi XE5?
This functionality is not related to dbExpress driver for InterBase and Firebird functionality, but to DBExpress technologies.
To learn about transaction management, refer to the Embarcadero documentation.
To learn about transaction management, refer to the Embarcadero documentation.
-
- Posts: 11
- Joined: Tue 30 Nov 2010 04:17
Re: How migrate project from Delphi 7 to Delphi XE5?
I did not find about it
Re: How migrate project from Delphi 7 to Delphi XE5?
Transaction management in dbExpress 4 is performed with the meethods:
http://docwiki.embarcadero.com/Librarie ... ransaction
http://docwiki.embarcadero.com/Librarie ... ransaction
http://docwiki.embarcadero.com/Librarie ... FreeAndNil
http://docwiki.embarcadero.com/Librarie ... FreeAndNil
After transaction starts, all further operations with data (reading or writing) are performed inside the transaction until the transaction ends, or until another transaction starts.
For example:
http://docwiki.embarcadero.com/Librarie ... ransaction
http://docwiki.embarcadero.com/Librarie ... ransaction
http://docwiki.embarcadero.com/Librarie ... FreeAndNil
http://docwiki.embarcadero.com/Librarie ... FreeAndNil
After transaction starts, all further operations with data (reading or writing) are performed inside the transaction until the transaction ends, or until another transaction starts.
For example:
Code: Select all
var
Transaction1, Transaction2: TDBXTransaction;
begin
Transaction1 := SQLConnection1.BeginTransaction(0); // start transaction with a "ReadCommitted" isolation level
SQLQuery1.Open; // SQLQuery1 opens in the context of Transaction1
Transaction2 := SQLConnection1.BeginTransaction(0); // start another transaction
try
SQLQuery2.ExecSQL; // execute some updates on data in the context of Transaction2
SQLConnection1.CommitFreeAndNil(Transaction2); // commit changes, Transaction1 remains open
except
SQLConnection1.RollbackFreeAndNil(Transaction2); // rollback changes
end;
end;
-
- Posts: 11
- Joined: Tue 30 Nov 2010 04:17
Re: How migrate project from Delphi 7 to Delphi XE5?
I read this.
My Problem: Property TSQLQuery.TransactionLevel removed from DBExpress 4.X.
Query execute in last started transaction.
I not find any property for setting transaction context for TSQLQuery.
In my application for Firebird I use first long readonly transaction,
and second write transaction for edit data.
After start second transaction I can't open next SQLQuery in readonly transaction.
Thanks
Vadim Mescheryakov
My Problem: Property TSQLQuery.TransactionLevel removed from DBExpress 4.X.
Query execute in last started transaction.
I not find any property for setting transaction context for TSQLQuery.
In my application for Firebird I use first long readonly transaction,
and second write transaction for edit data.
After start second transaction I can't open next SQLQuery in readonly transaction.
Thanks
Vadim Mescheryakov
Re: How migrate project from Delphi 7 to Delphi XE5?
Unfortunately, this behavior is related to dbExpress technologies - and we can't influence it in any way. Obviously, due to such changes in the behavior of dbExpress 4, you will have to change the business logic of your application somehow.