Query Problem - Mailing list pgsql-general

From Sheikh Salman Ahmed
Subject Query Problem
Date
Msg-id BAY109-W340FF7310701C51BCB2B09989A0@phx.gbl
Whole thread Raw
Responses Re: Query Problem
Re: Query Problem
List pgsql-general
Hi Fellows
 
I still have problem to access my databank.It shows syntax problem,I am using VC++ 2005 with postgresql 8.3.My table name is Person and it has three column,Person ID,first name and last name (testing version).whole c++ code is
 
 
// Test_postgres.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "libpq-fe.h"
 
 
int _tmain(int argc, _TCHAR* argv[])
{
const char *conninfo;
PGconn *conn;
const char *paramtext = "server_version";
PGresult *res;
conninfo = "hostaddr = 127.0.0.1 dbname = Salman_db user = postgres password = 732047";
conn = PQconnectdb(conninfo);
if (PQstatus(conn) != CONNECTION_OK)
{
printf("Unable to establish connection: %s",
PQerrorMessage(conn));
return 1;
} else
{
 
res = PQexec(conn, "INSERT INTO public.Person VALUES (221,'Siddiqi','Umer')");
if (PQresultStatus(res) != PGRES_COMMAND_OK)
{
printf("Problem with command: %s\n", PQerrorMessage(conn));
PQclear(res);
PQfinish(conn);
return 1;
}
PQclear(res);
}
PQfinish(conn);

return 0;
}
 
It shows no relation between public and person,if i write only person ,it show ,Person doesn't exist.
 
hope, u ppl can help me.
 
Sheikh Salman Ahmed
Diplomand in Nano Struktur Technologie
Duisburg-Essen Universität
Mobile : 0049-179-9463738
Home :0049-203-3945028




Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! Try it!

pgsql-general by date:

Previous
From: Susan Crayne
Date:
Subject: Installation problem -- another installation is in progress
Next
From: "Matt Magoffin"
Date:
Subject: Re: Memory use in 8.3 plpgsql with heavy use of xpath()