DbDataAdapter.InsertCommand

A

Anonymous

How do I automatically generate a InsertCommand (with a CommandBuilder) from
a select statement, when using the DB provider independant
Common.DbDataAdapter?

I can only find code for:
1. specifying the parameters by myself.
OR
2. using DB provider dependant classes.

Is there no support in adonet for generating a DB provider independant
insert statement from a select statement?
 
M

Mary Chipman [MSFT]

Writing true provider-independent code is still a dream that is yet to
be completely realized in ADO.NET. You get to a certain point, and
then you get bit by parameter placeholders and delimiters, and end up
either falling back on dynamic SQL (evil) or branching to
provider-specific code blocks. Here's a link to the documentation that
discusses configuring parameters and parameter data types:
http://msdn.microsoft.com/en-us/library/yy6y35y8.aspx

--Mary
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top