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)

    Try
        comd.Connection = conn
        comd.CommandText = SQl
        adpter.SelectCommand = comd
        adpter.Fill(dta)
        status = 0

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

    End Try
   End Sub

Hi
You should try posting to the database forum, my MySQL knowledge is limited but someone there should help

The MySql section is here: Web Development, Databases, MySQL

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.