C
ccshine via AccessMonster.com
I'm creating a C# .NET Winform application with Access 2000 on the back-end.
In order to write the dataset back to the database, it was necessary to
create my own InsertCommand for the DataAdapter. I decided to create an
Access stored query to insert new rows for use as the InsertCommand.
If I run the application in .NET and attempt to save via this stored query,
the datagrid displays exclamation points in red circles in the left-hand
column and doesn't update the table. When I run the query in Access itself
without the AutoNumber field as a parameter in the query, it tells me that I
don't have enough parameters. If I add the AutoNumber field to the list of
parameters and run it in Access, it inserts the info that I provide but it
won't AutoNumber - which completely misses the point of AutoNumber.
Here's the table design: inventoryID (AutoNumber), date, chemicalID,
amtInStock
Here's the query to insert: INSERT INTO dailyInventory VALUES (date,
chemicalID, amtInStock);
Can someone help me out?
In order to write the dataset back to the database, it was necessary to
create my own InsertCommand for the DataAdapter. I decided to create an
Access stored query to insert new rows for use as the InsertCommand.
If I run the application in .NET and attempt to save via this stored query,
the datagrid displays exclamation points in red circles in the left-hand
column and doesn't update the table. When I run the query in Access itself
without the AutoNumber field as a parameter in the query, it tells me that I
don't have enough parameters. If I add the AutoNumber field to the list of
parameters and run it in Access, it inserts the info that I provide but it
won't AutoNumber - which completely misses the point of AutoNumber.
Here's the table design: inventoryID (AutoNumber), date, chemicalID,
amtInStock
Here's the query to insert: INSERT INTO dailyInventory VALUES (date,
chemicalID, amtInStock);
Can someone help me out?