After adding index key into table, not able to delete record from table.
VB. Net
using below syntax:
Public Function mtdSQLExec(ByVal v_strSQL As String) As Integer
On Error GoTo ErrorHandler
Dim conn As OdbcConnection = New OdbcConnection(g_strConnString)
conn.Open()
Dim comm As OdbcCommand = New OdbcCommand(v_strSQL, conn)
Dim nRC As Integer 'store the number of records affected
nRC = comm.ExecuteNonQuery()
conn.Close()
ExitPath:
Exit Function
ErrorHandler:
'mtdNew = Err.Number
MsgBox("Database error! Please contact xxxx")
mtdLog(v_strSQL)
mtdSQLExec = 1 'return "1" to indicate error has occured...
Resume ExitPath
End Function
Sam.
VB. Net
using below syntax:
Public Function mtdSQLExec(ByVal v_strSQL As String) As Integer
On Error GoTo ErrorHandler
Dim conn As OdbcConnection = New OdbcConnection(g_strConnString)
conn.Open()
Dim comm As OdbcCommand = New OdbcCommand(v_strSQL, conn)
Dim nRC As Integer 'store the number of records affected
nRC = comm.ExecuteNonQuery()
conn.Close()
ExitPath:
Exit Function
ErrorHandler:
'mtdNew = Err.Number
MsgBox("Database error! Please contact xxxx")
mtdLog(v_strSQL)
mtdSQLExec = 1 'return "1" to indicate error has occured...
Resume ExitPath
End Function
Sam.