reading a blob from a postggreSQL db

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: reading a blob from a postggreSQL db

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux