How to insert a new record into an empty ACCESS table using GirdView and AccessDataSource
Posted on 2012-03-16
We're creating some web application using VS 2010 with Visual Basic.
We try to insert a new record (the 1st record) into an empty ACCESS table, using gridView and AccessDataSource.
We configure GridView to bind with the AccessDataSource and also configure the AccessDataSource for SELECT, INSERT, UPDATE, and DELETE statements.
The problem is that when we run the web page, because the ACCESS table is empty, the GridView does not show up in the page. We could not do anything with GridView because it is invisible.
(NOTES: we can retrieve data from ACCESS table correctly - the GridView displays the data if some rows exist in the table)
If you've some idea how to do this: insert the 1st record into an empty table, using GridView and AccessDataSource, please help.
(We could do it using OleDbConnection, DataSet, and OleDbDataAdapter, ... - we now want to use GridView and AccessDataSource for the sake of code consistence)
Thanks a lot for any help,