Hello,
Getting error
Error 2 Type 'SqlCommand' is not defined
from previous help on statment
Private Sub Testbutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Testbutton.Click
Dim colCmd As New SqlCommand
Dim objConn As New SqlConnection("")
Dim locTab As New DataTable
Try
objConn.Open()
With colCmd
.CommandType = CommandType.Text
.CommandText = "INSERT INTO Settlement VALUES(" & PreviouAdvDepositstxtTextBox.Text & ", " & TransferGuestLedgertxt.Text & "," & Activityadvdeposittxt.Text & "," & transferfromadvdeposittxt.Text & ", " & transfromguesttoadvtxt.Text & "," & Advchangefrominctxt.Text & ")"
.Connection = objConn
.ExecuteNonQuery()
End With
objConn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Where should I put the Imports System.Data.SqlClient statment?
Thanks JK