A
AdamM
Currently, my code reads from a database without knowing the order of the
columns like this:
string name = (string)datarow["name"];
However, is there a way to write or do an INSERT back to a database without
getting caught up in the order of the columns?
Right now I do something like this, which is delicate and breaks if the
order of the columns changes:
database.ExecuteNonQuery("INSERT INTO dbtable VALUES ('texas', 'austin',
1971)";
Thanks in advance!
columns like this:
string name = (string)datarow["name"];
However, is there a way to write or do an INSERT back to a database without
getting caught up in the order of the columns?
Right now I do something like this, which is delicate and breaks if the
order of the columns changes:
database.ExecuteNonQuery("INSERT INTO dbtable VALUES ('texas', 'austin',
1971)";
Thanks in advance!