Public Function Add_Rec :
Public Function Add_Rec :
This method is used to insert a row in the table
It accepts one argument namely sqlstr
ExecuteNonQuery method of command object executes the given query and returns number of records.
Public Function Add_Rec(ByVal sqlstr As String)
Try
'MsgBox(sqlstr)
cmd = New SqlCommand(sqlstr, con)
con.Open()
result = cmd.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.ToString)
Finally
con.Close()
End Try
End Function
<< Home