For i As Integer = 0 To lstParticipant.SelectedItems.Count - 1
Try
SQLstr = "INSERT INTO Training_Conducted (Date_of_Training, Training_Code, Name_of_Facualty,
Participant_Name) VALUES
('" & DateTimePicker.Text & "','" & cmbTranCode.SelectedValue & "','" & txtFacInt.Text & ",'" & lstParticipant.SelectedItem(i).ToString & "')"
Command = New OleDbCommand(SQLstr, Mycn)
icount = Command.ExecuteNonQuery
MessageBox.Show("Records Stored Successfully")
Catch ex As Exception
MessageBox.Show("could not insert record")
End Try
help me
*Always use code blocks for your code ==>
This post has been edited by PsychoCoder: 06 November 2007 - 10:47 PM

New Topic/Question
Reply




MultiQuote



|