I use visual basic 2008 and MYSQL (Storage engine is innodb)
Is use this code to retrieve informatie (see below)
The SQL string ="select * from articles where articlenb=12345"
I want to check of this record is used by een othor user in the network.
Can use innodb for row-based locking?
Is this the correct command : SELECT ... LOCK IN SHARE MODE

Imports MySql.Data.MySqlClient
Imports System.IO

Public Class MysqlConSjC

Private conn As MySqlConnection
Private connStr As String
Public strace As String
Private status As Integer

'status member variable for connectivity. 0 for success, 
'value of one indicates db connection error
'value of 2 indicates query failure

Private comd As MySqlCommand
Private adpter As MySqlDataAdapter
Private dta As DataTable

Public Sub Query(ByVal SQl As String)

        comd.Connection = conn
        comd.CommandText = SQl
        adpter.SelectCommand = comd
        status = 0

    Catch ex As MySqlException
        strace = ex.StackTrace()
        status = 2

    End Try
   End Sub
This question has already been answered. Start a new discussion instead.