Expand|Select|Wrap|Line Numbers
- Imports System.Data.SqlClient
- Public Shared Sub xxx(ByVal sT As SecurityTier)
- Try
- Dim id As String = sT.getID 'textbox value
- Dim pass As String = sT.getPass 'textbox value
- Dim ans As String = sT.getAns 'textbox value
- Dim ra As Integer
- sqlcommand = "INSERT INTO Staff (Staff_ID, Staff_Pass, Staff_Level) "_ &
- "VALUES ('" & id & "','" & pass & "','" & ans & "')"
- Initialize()
- cmdBook = New SqlCommand(sqlcommand, conBook)
- ra = cmdBook.ExecuteNonQuery
- Catch ex As SqlException
- MessageBox.Show(ex.Message)
- Finally
- Terminate()
- End Try
- End Sub
i remove the primary key in table just to test, but there is no data being insert, any help or guide will greatly appreciate