Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ MFC ADO.NET database
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
Edited 16-Jun-10 4:33am
Moak11.4K
v2

1 solution

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

Solution 1

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. Smile | :)
  Permalink  
v3
Comments
Mojosound2007 at 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 at 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
0 Zoltán Zörgő 185
1 Sergey Alexandrovich Kryukov 160
2 Peter Leow 100
3 CPallini 70
4 Ramza360 51
0 Zoltán Zörgő 80
1 the other paul 23
2 Shmuel Zang 10
3 Aarti Meswania 5
4 Member 11389991 -2


Advertise | Privacy | Mobile
Web01 | 2.8.150129.1 | Last Updated 16 Jun 2010
Copyright © CodeProject, 1999-2015
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