#13 DataAdapter InsertCommand using Parameters

closed
nobody
None
5
2007-03-23
2004-02-11
Brett Swift
No

I have created an insert statement using parameters
from a dataset that has been passed into this function.
When I add the command to the dataAdapter, all the
columns are matched up with source columns correctly,
but when it does the actual update to teh
database....whatever the first record was in the table
i'm about to insert... it repeats the first row on top of all
the other rows.

ie. if there was one column in the datatable before
updating.. it'd have these records.
513
514
515

then when i do dataadapter.update, this is what
appears in the DB

513
513
513.

Anyone have any ideas?

This is the InsertCommand:

INSERT INTO t_35(DATA_ITEM, RESOURCE_NAME,
OPR_DATE, INTERVAL_NUM, VALUE, StatID) VALUES
(@DATA_ITEM, @RESOURCE_NAME, @OPR_DATE,
@INTERVAL_NUM, @VALUE, @StatID)

Discussion

    • status: open --> closed