PC Review


Reply
Thread Tools Rate Thread

DbDataAdapter.InsertCommand

 
 
Anonymous
Guest
Posts: n/a
 
      21st Oct 2008
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?


 
Reply With Quote
 
 
 
 
Mary Chipman [MSFT]
Guest
Posts: n/a
 
      24th Oct 2008
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

On Tue, 21 Oct 2008 22:48:26 +0200, "Anonymous" <(E-Mail Removed)>
wrote:

>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?
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DbDataAdapter.Fill() - just the first row =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= Microsoft ADO .NET 9 26th Apr 2007 11:14 PM
DbDataAdapter.Update does nothing Olivier Matrot Microsoft ADO .NET 1 26th Jun 2006 02:52 PM
A DbDataAdapter issue Manuel Vázquez Acosta Microsoft ADO .NET 1 16th Nov 2004 10:40 AM
Re: DbDataAdapter Lloyd Dupont Microsoft Dot NET Compact Framework 0 14th Jul 2003 02:13 AM
DbDataAdapter Lloyd Dupont Microsoft Dot NET Compact Framework 0 14th Jul 2003 02:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:03 AM.