I cannot read unlocked tables in session in adodb MySQL connection
The next SQL statement in my ADODB (VB.NET 2.0) connection cnData is my connection object.
cnData.Execute("lock tables t_itemprocess_rawmaterial write")
cnData.BeginTrans()
cnData.Execute("insert into t_itemprocess_rawmaterial(processitem_id,rm_id) values(10,34)")
Dim lrsData As New ADODB.Recordset
lrsData.Open("select * from t_item where item_id=651", cnData, ADODB.CursorTypeEnum.adOpenStatic)
// above code gets error like table t_item was not locked...
cnData.CommitTrans()
cnData.Execute("unlock tables")
Give me a suggestion what is wrong, this code and how to read unlocked tables in session.
+3
source to share
No one has answered this question yet
See similar questions:
or similar: