Below is the code I am using to delete a certain set of records,
Dim conPrepaid2 As SqlConnection
Dim strDelete As String
Dim cmdDelete As SqlCommand
Dim records_deleted As Integer
Dim conn_string As String
conPrepaid2 = New
SqlConnection("Server=localhost;UID=abc;PWD=sec;database=prep")
strDelete = "Delete From temp_radonline Where nasidentifier LIKE @nas"
cmdDelete = New SqlCommand(strDelete, conPrepaid2)
conPrepaid2.Open()
records_deleted = cmdDelete.ExecuteNonQuery()
conPrepaid2.Close()
Label1.Text = records_deleted
I used to drop a Datadapter and a dataset on form and have used it for
displaying, modifification and insertion, donno how can use them to delete, by
the way is the code ok to delet records?