Subject | Re: VB + Firebird Lock |
---|---|
Author | kevtey |
Post date | 2006-02-17T16:19:54Z |
this is how i write my connectionstring in VB
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.ConnectionString = "PROVIDER=ZStyle IBOLE Provider;Data Source=" & _
"c:\program files\firebird\Firebird_1_5\rich_vintage.fdb; user
id=sysdba;password=admin;auto_commit=true"
cn.Open
cn.CursorLocation = adUseServer
cn.BeginTrans
edit button is press then this code is run
strsql = "select * from i_agent where agent_id='" & Combo1 & "' with
lock;"
rs.Open strsql
Text1.Text = rs("name")
rs.Close
when save button is press
cn.CommitTrans
cn.Close
if let say before user1 press save button , user2 wanted to read the
record from i_agent i will have error
is there a way to allow user2 to read the table?
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.ConnectionString = "PROVIDER=ZStyle IBOLE Provider;Data Source=" & _
"c:\program files\firebird\Firebird_1_5\rich_vintage.fdb; user
id=sysdba;password=admin;auto_commit=true"
cn.Open
cn.CursorLocation = adUseServer
cn.BeginTrans
edit button is press then this code is run
strsql = "select * from i_agent where agent_id='" & Combo1 & "' with
lock;"
rs.Open strsql
Text1.Text = rs("name")
rs.Close
when save button is press
cn.CommitTrans
cn.Close
if let say before user1 press save button , user2 wanted to read the
record from i_agent i will have error
is there a way to allow user2 to read the table?