ORACLE BLOB

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

ORACLE BLOB

Postby mariocarrera » Thu Feb 08, 2007 8:07 am

Hi all
I'm using vast 601, and need to reed and write a Blob field from a table. I got a runtime error because the blob is undefined.
So I redefined
AbtOracle8DatabaseManager class>>#buildTypeDict
"Answer a newly constructed dictionary to map Oracle Internal datatypes returned by the
Oracle server to the appropriate Smalltalk field classes."
" AbtOracle8DatabaseManager
typeDict: nil;
typeDict: AbtOracle8DatabaseManager buildTypeDict. "

^ ( Dictionary new )
at: 1 put: AbtDatabaseVarCharField; "VARCHAR2"
at: 2 put: AbtOracle8DecimalField; " Number "
at: 3 put: AbtDatabaseLongIntegerField;
at: 4 put: AbtDatabaseDoubleFloatField; " FLOAT"
at: 7 put: AbtOracle8DecimalField; " Number "
at: 8 put: AbtOracleLongField; " LONG/LONG VARCHAR"
at: 9 put: AbtDatabaseVarCharField; "VARCHAR"
at: 11 put: AbtDatabaseVarCharField; "ROWID. These are treated as VARCHAR2 fields "
at: 12 put: AbtOracleDateField; "DATE"
at: 23 put: AbtOracleRawField; "RAW"
at: 24 put: AbtOracleLongRawField; " LONG RAW "
at: 96 put: AbtDatabaseFixedCharField; "CHAR"
" at: 105 put: AbtOracleMlsLabelField ; " " MLSLABEL "
" at: 111 put: AbtRefField;" " REF "
" at: 112 put: AbtCLOBField;" " CLOB "
"My change*******************"
at: 113 put: AbtOracleLongRawField; " BLOB"
"end my change**************"
yourself.

So I get an ByteArray. that rapresents the file stored on the table. Now I nee to transform it... but I don't know how...

Thank for help
mariocarrera
 
Posts: 17
Joined: Thu Dec 14, 2006 6:53 am

Postby tc » Mon Feb 12, 2007 11:09 pm

Looks like you got further along based on your other post but remember, these are not BLOBs. BLOBs are files stored by Oracle and the pointer to the file is kept in the table, not the data itself.

If you download st 7.5, you can see how BLOBs work.

--tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: No registered users and 1 guest