1) Why are you using ODBC to access SQL Server? SqlClient is faster, has
100% coverage of SQL Server features as well as easier management (no DSNs
or other ODBC dependencies). ODBC is useful when working with databases that
do not have .NEW managed providers.
2) To execute any query from ADO.NET you need to build a "Command" object
whose CommandText is set to the SQL text for the query.
I expect my book would help. It's designed to help both beginners and pros
work with ADO.NET, SQL Server and VB.NET.
hth
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
[quoted text, click to view] "Alan Morris" <alan@address-witheld.com> wrote in message
news:2h7ku3h4cb2pcahjjtacoue1kvdgu0uog5@4ax.com...
> As a newbie to ADO.NET I am struggling with the following:
>
> I have an ODBC data table that I want to use a source for updates to a
> SQL server table, I envisage the sql query having the following
> structure:-
>
> INSERT INTO SQL_TABLE FROM SELECT ODBC_TABLE WHERE ODBC_TABLE.KEY NOT
> IN (SELECT SQL_TABLE.KEY FROM SQL_TABLE)
>
> How do I do this in ado.net if a sql query is run against a specific
> connection object?
>
> Hope the above makes sense.
>
> Help greatly appreciated.
>
> Regards,
>