Hi
I have a table in MS Access....that contains fields
ID (number)
Name (Text)
Date_Issue (Date)
Date_Return (date)
Flag (Yes/No)
Now in my windows from i have a combobox, testbox, listbox and datepicker.
I want to insert values from these controls to my table....
I m using the following syntax
"INSERT INTO Table(ID,Name,Date_of_Issue,Date_of_Return,Flag) Values (" & ListBox1.SelectedValue & ",'" & TextBox1.Text & "','" & DateTimePicker1.Text & "','" & DateTimePicker2.Text & "',1)"
But it doesnt work....it gives an exception saying
Cast from type 'DataRowView' to type 'String' is not valid
Please help...
thanks
I have a table in MS Access....that contains fields
ID (number)
Name (Text)
Date_Issue (Date)
Date_Return (date)
Flag (Yes/No)
Now in my windows from i have a combobox, testbox, listbox and datepicker.
I want to insert values from these controls to my table....
I m using the following syntax
"INSERT INTO Table(ID,Name,Date_of_Issue,Date_of_Return,Flag) Values (" & ListBox1.SelectedValue & ",'" & TextBox1.Text & "','" & DateTimePicker1.Text & "','" & DateTimePicker2.Text & "',1)"
But it doesnt work....it gives an exception saying
Cast from type 'DataRowView' to type 'String' is not valid
Please help...
thanks