Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / March 2008

Tip: Looking for answers? Try searching our database.

Help with multiple connector/table query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan Morris - 26 Mar 2008 11:11 GMT
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,
William Vaughn [MVP] - 26 Mar 2008 18:12 GMT
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

Signature

__________________________________________________________________________
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)
____________________________________________________________________________________________

> As a newbie to ADO.NET I am struggling with the following:
>
[quoted text clipped - 13 lines]
>
> Regards,
Alan Morris - 27 Mar 2008 00:43 GMT
Many thanks your reply, I am using ODBC because the source database is
proprietary (non SQL server).

Regards,

>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
[quoted text clipped - 7 lines]
>
>hth

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.