N
nashak
I have created a select statement and then used commandbuilder to
generate other statements. However, I have landed with an issue that
MSDN says cannot be handled. The table in my datasource created a
identity value when a new row is inserted and I cannot get the value of
this PKey back using the commandbuilder's insert statement. What are my
options other than using a stored procedure?
Can I create a sql insert statement at run time (dynamically). I.e. I
get a dataset with my select statement. Now without mentioning the
column names in my INSERT statement, can I create a INSERT statement
that get the column names (from some property of column collection etc.
etc.) and then pass parameters for the values of these fields. Also,
can I generate these parameters dynamically from the dataschema of my
dataset?
I hope I've explained my situation. Please let me know if that is not
the case.
Thanks very much
generate other statements. However, I have landed with an issue that
MSDN says cannot be handled. The table in my datasource created a
identity value when a new row is inserted and I cannot get the value of
this PKey back using the commandbuilder's insert statement. What are my
options other than using a stored procedure?
Can I create a sql insert statement at run time (dynamically). I.e. I
get a dataset with my select statement. Now without mentioning the
column names in my INSERT statement, can I create a INSERT statement
that get the column names (from some property of column collection etc.
etc.) and then pass parameters for the values of these fields. Also,
can I generate these parameters dynamically from the dataschema of my
dataset?
I hope I've explained my situation. Please let me know if that is not
the case.
Thanks very much