Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> BLOBS via ODBC - Access Violation Every Time

BLOBS via ODBC - Access Violation Every Time

From: David Murphy <NetDirect_at_compuserve.com>
Date: Thu, 05 Oct 2000 17:08:01 GMT
Message-ID: <8richd$cu5$1@nnrp1.deja.com>

Hi - we are trying to insert data into a BLOB column using Oracle's ODBC driver ODBC version 8.01.05.00 2/16/99. It crashes with an access violation every time.

If we do the same code with a LONG RAW everything works just fine..

The table has one column which is a BLOB. It crashes on the 2nd call to SQLParamData which should just return a status to say no more data is required. The amount of data is around 50K.

The code (summarized) is..

SQLPOINTER p;
while (SQLParamData(hStatementHandle, &p) == SQL_NEED_DATA) { ..
  long nMaxChunk = 32000;
  long nDone=0;

  while (nDone < nSize) {
    long nToSend = nSize - nDone;
    if (nToSend > nMaxChunk)
      nToSend = nMaxChunk;

      int nStatusPut = SQLPutData(hStatementHandle, pData + nDone, nToSend);

      nDone += nToSend;
 }
}

BTW - how does one download the latest ODBC drivers for an Oracle release? I find their site particularly confusing and still cannot find any such download.

Thanks
David M

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Oct 05 2000 - 12:08:01 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US