I'm very new to sqlapi++ . Based on the tutorial provided in the official website I tried connecting to postgresql database that is running on my system.
#include<stdio.h>
#include<conio.h>
#include<SQLAPI.h>
void main()
{
SAConnection con;
try
{
con.Connect("localhost@postgres","postgres","12345",
SA_PostgreSQL_Client);
printf("We are connected");
}
catch(SAException &x)
{
printf("%s\n",(const char*)x.ErrText());
}
_getch();
}
I'm programming in Visual studio 2010, the include path points to SQLAPI/include directory and the same for library, I have used release version of static library sqlapis.lib. The program is building but when I run it it shows error as
libpq.dll: The specified module could not be found. pq.dll: The specified module could not be found.
DBMS API Library loading fails This library is a part of DBMS client installation, not SQLAPI++ Make sure DBMS client is installed and this required library is available for dynamic loading
Can I know how to get rid of this ?