How do I start a transaction?
I am using Delphi font end (strongly typed) and .Net Server … which uses ADO.net Driver for database MS SQL 2008 R2.
I have tried casting the interface but it says it not supported.
Connection := (RemoteService as IDAADOConnection)
OR
Connection :=(RemoteService as IDAConnection)
Both are not supported. Please shed some light on the correct way to go about this! Thanks.
This is the type of code I wish to use…
Connection := (RemoteService as IDAADOConnection) OR (RemoteService as IDAConnection)
if Connection.InTransaction then
begin
Connection.RollbackTransaction;
Connection.BeginTransaction;
end
else
Connection.BeginTransaction;