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...

Recommended Answers

All 3 Replies

@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.

@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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.