G
Guest
VB.NET 2.0 project...
I have an Access database with a table that has one primary key. I have used
the Add TableAdapter wizard in VS2005 to create my TableAdapter. Next I added
an ObjectDataSource object to a new aspx form, chosen the newly created
TableAdapter and selected the parameterised Update command from the drop list
provided. Finally I added a GridView control and bound it to the ODS.
The problem I have is an error I get when clicking Update after an edit on
the gridview. "ObjectDataSource 'ods_SingleTile' could not find a non-generic
method 'Update' that has parameters: Tile_Number, Tile_Name, Tile_Path,
Value, Sold, Payment_Verified, Owner_Type, Line_1, Line_2, First_Name,
Last_Name, Company, Address, State, Postcode, Country, Email, Phone,
Original_Tile_Number, [Tile Number], [Tile Path], [Payment Verified], [Owner
Type], [Line 1], [Line 2], [First Name], [Last Name], original_Tile Name. "
The primary key in my table is "Tile Name" and I have checked that the
gridview has this Read Only set to False for this field. I have tried setting
this to True also with no improvement. I've also tried not using this field
in the gridview at all.
I have even gone back to scratch with the table and tried removing the
promary key altogether, but unfortunately the DataTable wizard in VS2005
won't generate an UPDATE statement for a table without a primary key.
I'm totally at a loss here. i have looked back at other VB.NET projects
where I've successfully used an updatable GridView in conjunction with Access
tabales with primary keys. Apart from the obvious differences in table and
field names I can't for the life of me figure out what I'm doing wrong this
time round. Any help or perals of wisdom would be greatly appreciated.
I have an Access database with a table that has one primary key. I have used
the Add TableAdapter wizard in VS2005 to create my TableAdapter. Next I added
an ObjectDataSource object to a new aspx form, chosen the newly created
TableAdapter and selected the parameterised Update command from the drop list
provided. Finally I added a GridView control and bound it to the ODS.
The problem I have is an error I get when clicking Update after an edit on
the gridview. "ObjectDataSource 'ods_SingleTile' could not find a non-generic
method 'Update' that has parameters: Tile_Number, Tile_Name, Tile_Path,
Value, Sold, Payment_Verified, Owner_Type, Line_1, Line_2, First_Name,
Last_Name, Company, Address, State, Postcode, Country, Email, Phone,
Original_Tile_Number, [Tile Number], [Tile Path], [Payment Verified], [Owner
Type], [Line 1], [Line 2], [First Name], [Last Name], original_Tile Name. "
The primary key in my table is "Tile Name" and I have checked that the
gridview has this Read Only set to False for this field. I have tried setting
this to True also with no improvement. I've also tried not using this field
in the gridview at all.
I have even gone back to scratch with the table and tried removing the
promary key altogether, but unfortunately the DataTable wizard in VS2005
won't generate an UPDATE statement for a table without a primary key.
I'm totally at a loss here. i have looked back at other VB.NET projects
where I've successfully used an updatable GridView in conjunction with Access
tabales with primary keys. Apart from the obvious differences in table and
field names I can't for the life of me figure out what I'm doing wrong this
time round. Any help or perals of wisdom would be greatly appreciated.