Hello

 

First, forgives my BAD English

 

“I have a Problem”

 

Think have and string connection to a Firebird database with ADOConnection Component on a Button called “Connect”

…..

var

p1, p2 , p3 : string;

begin

 

            With ADOConnect do

            begin

                        p1 := ‘Provider=MSDASQL.1;Password=dummy;Persistent Security Info = True; User ‘;

                        p2 := ‘ID=SYSDBA; Extended Properties=”Driver=Firebird/Interbase(r) driver;’;

                        p3 := ‘UID=MCSSITE; PWD=mcssite; DBNAME= 192.168.0.21:C:\DATA\Database.FDB“’;

                        ConnectionString := p1 + p2 + p3

                        Connected :=True;

            End;

End;

 

The Connection proceeds OK, no erros.

 

Now, one Button in my Form Called “Insert”

 

Begin

            ADOConnect.BeginTrans;

            TBClient.Append;

            TBClient.FieldByName(`ID`).Value := Max(TBClient) + 1; //Return de Max Element from then TbClient (ATENT FOR THIS LINE)

 

            <Other necessary information for first part of insertion>

           

tbClient.Post

            tbClient.Edit; //necessary but I’m must display this information on Screen before continue data insertion

 

            < The Second or other parts of Insertion (Update) occurs from here until click on Button “Confirm”>

            <I’m not committrans, but this occurs also em button called “Confirm” >

End;

 

And, finally, the button Called “Confirm” //after all fields from the Form filled, proceed the POST

 

Begin

            TBClient.Post;

            ADOConnect.CommitTrans;

 

End;

 

 

Function MAX()

begin

QR.Close;

            QR.Sql.Clear;

            QR.Sql.Add(‘SELECT MAX(id) FROM TBClient’);

            Qr.Open; //Here is pending (result of BLOCK when executing in a Second Machine)

            Result := fieldbyname(`ID`).Value + 1;

End;

 

 

For this program execute in one machine (one instance of the .exe) nothing problem.  BUT, when I execute the same .exe in 2 different machines, accessing the same Database, she BLOCKET the MAX function, on Open. Or Eeither, when one machine is in Edit state other machin’s cannot [select] over the same database table, she’s BLOCK the table. But, competing transactions where Implemented on database…

 

I’m believe the problem is on the ConnectionString, since the ADOConnection Component is set thus:

IsolationLevel : ReadCommited

Mode : ReadWrite

 

Buts, where this NOWAIT / WAIT parameters, recordVersion, norecordVersion…

I think must to Improve the ConnectionString for support the other parameters…

Please, you have a example ou same problem solved?

 

PLEASE, urgent.

 

----------------------------------------------------------------------------------------------------------------

Kurt Schneider

Analista de Sistemas

ControlSoft - Assessoria e Desenvolvimento de Sistemas

Fone: (66) 544 4364

Sorriso - MT

------------------------------------------------

"É bobagem especular sobre quais serão as tecnologias do Futuro.

O melhor a fazer é voltar a atenção para o Futuro das atuais tecnologias." Jean Paul Jacob