I successfully establish the connection but no data is inserted and SQLExecDirect() returns -2. Please correct my code as I am using ODBC & PostgreSQL for the first time .