|
-
April 23rd, 1999, 07:06 AM
#1
How to use CLongBinary in Oracle
Hi,
We have implemented a program in vc++ that write records with BLOB columns in sql server. That program bound the BLOB columns to CLongBinary objects.
We are trying to change that program to run under Oracle instead of Sql server. We have just change de openning of database(OpenEx) and we have created a RecordSet for Oracle that bound the BLOB columns to CLongBinary too. But it didn´t work. When we run the program, it returns the following error:
ORA-01461: can bind a LONG value only for insert into a LONG Column.
Does anyone know whats the problem?
Thanks
Nuno Santos
-
April 26th, 1999, 12:49 PM
#2
Re: How to use CLongBinary in Oracle
We are running Oracle 8.05 with Intersolv 3.5 ODBC drivers. The BLOB columns work only if the Recordset is defined as a snapshot, and the CDatabase::useCursorLib flag is set during OpenEx. Also, the BLOB columns are bound to CByteArray objects. When dynaset is selected, or the CursorLib is not used, the error ORA-01461 is returned.
-
April 30th, 1999, 10:55 AM
#3
Re: How to use CLongBinary in Oracle
I have just started to work on a similar project.
We have Oracle 8.05, and a table containing BLOBs. I tried to derive a CRecordset class using that table and having ClassWizard bind the columns to variables for me, but it didn't like the BLOBs, and created vars of type "INVALID". This was using the MS ODBC for Oracle driver.
I tried the same procedure using the Oracle 8.00.05 ODBC driver, and Class Wizard gave me CStrings for the BLOB columns- not exactly what I was expecting.
Can anyone shed some light on this subject? Shouldn't I get a CLongBinary or CByteArray? Do I have to bind the BLOBs myself? Or maybe use a different ODBC driver?
Thanks in advance,
-Dan
-
May 3rd, 1999, 04:54 PM
#4
Re: How to use CLongBinary in Oracle
The Intersolv (now Merant) Oracle 8 driver works with BLOBS. Go to the www.merant.com site and download the evaluation version to see if it works for you. Remember that you also need to have Oracle's Net8 installed on the client machine. Also, the Oracle ODBC driver did not work for me either.
-
May 5th, 1999, 09:43 AM
#5
Re: How to use CLongBinary in Oracle
Thanks, that worked great.
On a related note, how do you deal with "data truncated" and retrieving more than 255 bytes of data with a CByteArray? I changed nMaxLength in RFX_Binary to a larger value, which works, but might not be the smartest way.
-
May 5th, 1999, 10:42 AM
#6
Re: How to use CLongBinary in Oracle
Unfortunately, we have not found a way around this either. For now, I have defined a MAX_BLOB constant at 100K bytes which fits our needs, but future changes may necessitate a larger size. I would hate to have to recompile every time the blob exceeded the max.
-
June 22nd, 1999, 11:40 PM
#7
Re: How to use CLongBinary in Oracle
Dear Sir,
I am trying to save .WAV file into MS SQL Servers's 'image' field. I am unable to store and retrieve data from it.
Please send me any example if possible...
regards
ifi
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|