P
Paul
OK I'm lost.... Hope I can describe this that you will understand what I'm
taking about.
I have an Oracle dataset and I've inserted some rows into it, I now want to
update the database. I managed to do this by going thru each row and
creating an oraclecommand, passing the parameters and executenonquery, and
it works.
However instead of doing all that looping thru rows, I believe I can use the
dataadapter UPDATE method to do this for me (and it may be faster?)
Here is what I've done
Built an oraclecommand with INSERT INTO TEST (field1, field2) VALUES (?,?)
Set my dataadaptors insertcommand to the oraclecommand above
Added datamappings for my two columns
BUT..... I'm confused to how I create parameters. When updating row by row
I would do thecmd.Parameters.Add(colname, "THEVALUE"), but in this case I
don't have a value because it's based on the row currently being inserted.
How do I create the parameters? I tried this thecmd.Parameters.Add(colname,
oracleds.Tables(0).Columns(colloopy).DataType), but I get "Object must
implement Iconvertable"
I hope this makes sense to someone, sorry for the long post
Paul
taking about.
I have an Oracle dataset and I've inserted some rows into it, I now want to
update the database. I managed to do this by going thru each row and
creating an oraclecommand, passing the parameters and executenonquery, and
it works.
However instead of doing all that looping thru rows, I believe I can use the
dataadapter UPDATE method to do this for me (and it may be faster?)
Here is what I've done
Built an oraclecommand with INSERT INTO TEST (field1, field2) VALUES (?,?)
Set my dataadaptors insertcommand to the oraclecommand above
Added datamappings for my two columns
BUT..... I'm confused to how I create parameters. When updating row by row
I would do thecmd.Parameters.Add(colname, "THEVALUE"), but in this case I
don't have a value because it's based on the row currently being inserted.
How do I create the parameters? I tried this thecmd.Parameters.Add(colname,
oracleds.Tables(0).Columns(colloopy).DataType), but I get "Object must
implement Iconvertable"
I hope this makes sense to someone, sorry for the long post
Paul