0

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

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Stefano Mtangoo
0

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

Edited by jonsca: n/a

0

@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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.