Bypass ADO

  • Thread starter Thread starter lbolognini
  • Start date Start date
L

lbolognini

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
 
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
 
David said:
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
 
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
__________________________________________________________
 
Back
Top