Managed c++ vs Unmanaged c++

  • Thread starter Thread starter xyu3
  • Start date Start date
X

xyu3

Hello,

I'm new to dotnet.

I want to write an app that's communication with a sql server 7
database via ADO.NET. This app need to have fast and stable
throughput. I know that the database access itself will not be the
bottle neck.

The Question is whether i should use Manage c++/C# or Unmanaged C++ to
do it?

If I use Unmanaged c++, what sort of API should I use? for example MFC
or Win32 API or some other Wrappers?

Thanks a lot!
 
xyu3 said:
Hello,

I'm new to dotnet.

I want to write an app that's communication with a sql server 7
database via ADO.NET. This app need to have fast and stable
throughput. I know that the database access itself will not be the
bottle neck.

The Question is whether i should use Manage c++/C# or Unmanaged C++ to
do it?

If I use Unmanaged c++, what sort of API should I use? for example MFC
or Win32 API or some other Wrappers?

I suggest sticking to Managed C++. The overhead of switching back and
forth between managed and unmanaged code every time you access the
database will probably outweigh any gains you'd get from using unmanaged
code in the first place.

IMO, you should only use unmanaged code if you have a relatively long,
CPU intensive task that won't require any communication with the managed
parts of your program. For anything less, it isn't worth the context switch.

Jesse
 
Back
Top