Click here to Skip to main content
13,500,000 members (52,054 online)
Rate this:
Please Sign up or sign in to vote.
I have an application that used OBDC to connect to a SQL Server database. The application is an MFC application written in Visual C++. I have been asked to investigate moving from OBDC to ADO.NET. Is there any documentation available that describes an application of this type? What types if issues might I encounter? The application is several hundreds of thousands of lines of code and I am hoping this is not too intrusive a process. Thanks.
Posted 16-Jun-10 4:22am
Updated 16-Jun-10 4:33am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Mojosound2007 wrote:

What on Earth is that?Is is ODBC?

ADO.NET is an abstraction layer which uses SQL server managed provider for loading and saving data.It's supposed to be used in managed code but MFC library is based on UNmanaged C++ not managed (C++/CLI). So you don't need to move to ADO.NET if you are targeting MFC. :)
Mojosound2007 16-Jun-10 9:53am
We want to move away from ODBC. The choices given to us were OLE DB and ADO.NET. OLE DB is an older technology and ADO.NET newer. That is the extent of my knowledge at this moment.
Hristo Bojilov 16-Jun-10 10:11am
Yes ODBC is old and really difficult to use but it's efficient.If you mix managed and unmanaged code the results potentially could be awful.You need to use C++/CLI which is not stable enough, extremely sluggish and memory resource hog.Before years I've made small test program in C# and then rewrite the same code in C++/CLI.The second app was up to tree times slower and consumes 4 times more memory that C# ones.So is it worth to mix managed and unmanaged code-I say no.C++ is old language like OLE DB technology but it's still used and it will be used long time in the future.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.180111.1 | Last Updated 16 Jun 2010
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100