Home All Groups Group Topic Archive Search About
Author
4 Mar 2006 4:02 AM
lbolognini@gmail.com
Hi all,

out of curiosity, is there a way to bypass ADO completely and talk
directly to SQL Server? Do I have to step in the unmanaged world or can
I still achieve it from C#?

Thanks,
Lorenzo

Author
4 Mar 2006 4:21 AM
David Browne
<lbologn***@gmail.com> wrote in message
news:1141444941.872608.195050@e56g2000cwe.googlegroups.com...
> Hi all,
>
> out of curiosity, is there a way to bypass ADO completely and talk
> directly to SQL Server? Do I have to step in the unmanaged world or can
> I still achieve it from C#?
>


The low-level interfaces to SQL Server are in the System.Data.SqlClient and
System.Data.SqlTypes namespaces.  Technically these are part of ADO.NET, but
you can bypass DataSets and avoid (or control) the translation of data from
SQL Server types to CLR types by working directly with the types in those
namespaces.

There is no unmanaged library that offers better or more direct access to
SQL Server than these.


David
Author
5 Mar 2006 2:01 AM
lbolognini@gmail.com
David Browne wrote:

> The low-level interfaces to SQL Server are in the System.Data.SqlClient and
> System.Data.SqlTypes namespaces.  Technically these are part of ADO.NET, but
> you can bypass DataSets and avoid (or control) the translation of data from
> SQL Server types to CLR types by working directly with the types in those
> namespaces.
>
> There is no unmanaged library that offers better or more direct access to
> SQL Server than these.

Thanks David, much clearer now.

Lroenzo
Author
5 Mar 2006 8:56 AM
Sahil Malik [MVP C#]
You could technically use the TDSParser internal class, if you really really
needed super custom code. For instance, if you needed to implement
UpdateBatchSize in your own business objects - not just DataAdapter, thats
how you'd do that.
But for 99.99% tasks, SqlCommand is as close to the metal as you'd want to
be.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
__________________________________________________________


<lbologn***@gmail.com> wrote in message
Show quote
news:1141524061.929372.170760@i40g2000cwc.googlegroups.com...
>
> David Browne wrote:
>
>> The low-level interfaces to SQL Server are in the System.Data.SqlClient
>> and
>> System.Data.SqlTypes namespaces.  Technically these are part of ADO.NET,
>> but
>> you can bypass DataSets and avoid (or control) the translation of data
>> from
>> SQL Server types to CLR types by working directly with the types in those
>> namespaces.
>>
>> There is no unmanaged library that offers better or more direct access to
>> SQL Server than these.
>
> Thanks David, much clearer now.
>
> Lroenzo
>

AddThis Social Bookmark Button