Is this a web apps? You don't need to use the fillschema method becuase fill method already get the schema of the table.
VB Code:
Sub BindData() Dim strSelect as String strSelect="SELECT * FROM booking WHERE Date=" & myDate objBookingDA= New OleDBDataAdapter(strSelect,objConnection) objBookingCB= New OleDBCommandBuilder(objBookingDA) objBookingDA.Fill(objDataSet,"Bookings") dlstBookings.DataSource=objDataSet.Tables("Bookings") dlstBookings.DataBind End Sub
Question: When do you call the sub binddata? After you add a rows or before?
I guess you add first a row to the datatable before calling the sub binddata.




Reply With Quote