Click here to Skip to main content
15,886,639 members
Please Sign up or sign in to vote.
5.00/5 (1 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
Updated 16-Jun-10 3:33am
v2

1 solution

Mojosound2007 wrote:
OBDC


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. :)
 
Share this answer
 
v3
Comments
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.
[no name] 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900