954,496 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

PostgreSQL with Visual C++ 2010

Hi. I am working on a visual C++ app and I was wondering if it is possible to use PostgreSQL for database interaction instead of the default SQL Server? I saw a connector for .NET but it's written in C#, will that work for a C++ app also? Or is there some other PostgreSQL C++ connector for .NET?

Any help will be greatly appreciated...

ChaosKnight11
Light Poster
32 posts since Jul 2010
Reputation Points: 10
Solved Threads: 1
 
evstevemd
Senior Poster
3,713 posts since Jun 2007
Reputation Points: 462
Solved Threads: 392
 

@evstevemd - the OP is working with .NET so an unmanaged library like that would require marshaling between the unmanaged and managed layers

@OP - You should be able to use the C# library in your C++/CLI code. The intellisense in 2010 is crappy for C++/CLI but see what happens when you add the C# dll to your project, whether you get access to the namespaces.

You should get the same methods you would use in C#, but you'll have to determine which of the . are namespace related and turn those into :: and which of the . are method/member related and likely turn those into "->" I have never done this but it seems like it should be somewhat straightforward between 2 .NET languages.

jonsca
Quantitative Phrenologist
Team Colleague
5,621 posts since Sep 2009
Reputation Points: 1,165
Solved Threads: 581
 
@evstevemd - the OP is working with .NET so an unmanaged library like that would require marshaling between the unmanaged and managed layers


Nope! He have found .NET library but was asking if it can work with C++. Actually, I understand that he is asking for C++ library

evstevemd
Senior Poster
3,713 posts since Jun 2007
Reputation Points: 462
Solved Threads: 392
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: