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
mysql vb.net adodb


source to share


No one has answered this question yet

See similar questions:

2
Table [tablename] is not locked

or similar:

1086
How to connect to MySQL database in Python?
809
Insert into MySQL table or update if exists
769
How to get the sizes of MySQL database tables?
624
Duplicate MySQL table, indexes and data
590
How do I find all tables in MySQL with specific column names in them?
2
MySQL permanently locked on the table
1
locking the table for reading still allows select (mysql)
0
Use ADODB to INSERT INTO a specific table in an Excel workbook
0
Connecting ADODB to two access databases
0
ADODB cannot find SharePoint table



All Articles
Loading...
X
Show
Funny
Dev
Pics