reading a blob from a postggreSQL db

From: "Malm Paul" <paul(dot)malm(at)saabgroup(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: reading a blob from a postggreSQL db
Date: 2007-10-11 09:59:09
Message-ID: 9103513CAFE9554496DD17054510B6DFF907F3@corpappl002.corp.saab.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


Hi,
I would like to read a blob from a PostgreSQL database, osing ODBS and
C++.
I have succeded to connect to the database, but i have no idea how to
read a certain blob.

If some one could help me with the readBlob() function, I would be
pleased
(for example just to read a string of 5 characters that allways are in
the beginning of the blob)

Main function:
...
strcpy((char*)SQLStmt,"SELECT groupdata From submap where name =
'1860'");

//Prepare And Execute The SQL Statement
//
rc = SQLExecDirect(dbConnection.StmtHandle, SQLStmt, SQL_NTS);

//Read The Results Of The SQL Query
//
if (rc == SQL_SUCCESS)
{
dbConnection.readBlob();
}

SQLRETURN CODBC_Class::readBlob()
{
// I need help here.................
rc = SQLBindCol(StmtHandle, ..............................);
rc = SQLFetch(StmtHandle);

//Return The ODBC API Return Code To The Calling Function
//
return(rc);
}

Kind regards,
Paul

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2007-10-11 14:22:49 Re: Consistent PITR backup
Previous Message Thomas Karcher 2007-10-11 09:39:09 Consistent PITR backup