Hi!
I read that it is an upgrade Oracle support to v10. I use actuali vast 601 and oracle 10 and I have no probles, I want to know wy I need the new suport?
thanks
Mario
Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig
| connection newRow table oc |
(AbtDatabaseConnectionSpec forDbmClass: AbtOracle10DatabaseManager databaseName: 'orcl') connect.
connection := AbtDbmSystem activeDatabaseConnection.
table := (connection openTableNamed: 'sql_table').
oc := OrderedCollection new.
1 to: 2 do: [ :n |
newRow := table emptyRow.
newRow
at: #ID put: n;
at: #LAST_NAME put: 'SMITH', n asString;
at: #START_DATE put: Date today.
oc add: newRow ].
connection autoCommit: true.
table addRows: oc
"Insert an empty blob in a table"
| connection table oc clob newRow |
(AbtDatabaseConnectionSpec forDbmClass: AbtOracle10DatabaseManager databaseName: 'orcl') connect.
connection := AbtDbmSystem activeDatabaseConnection.
connection autoCommit: true.
table := (connection openTableNamed: 'clob_table').
clob := AbtOracleEmptyClob new.
oc := OrderedCollection new.
newRow := table emptyRow.
newRow
at: #ID put: 5;
at: #DATA put: clob.
oc add: newRow.
table addRows: oc.
| result fromFile querySpec resultCollection sqlString dict connection lobLocator buffer |
"get locator address"
(AbtDatabaseConnectionSpec forDbmClass: AbtOracle10DatabaseManager databaseName: 'orcl') connect.
connection := AbtDbmSystem activeDatabaseConnection.
sqlString := 'select * from clob_table where id = 5 for update'.
querySpec := (AbtQuerySpec new) statement: sqlString.
resultCollection := OrderedCollection new.
result := connection resultTableFromQuerySpec: querySpec.
result do: [:eachRow | resultCollection add: eachRow asDictionary ].
dict := resultCollection first.
lobLocator := (dict at: 'DATA') locatorAddress.
buffer := 'Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World!' asByteArray.
AbtOracleLobBuffer new
writeBufferToLob: lobLocator buffer: buffer connection: connection.
connection commitUnitOfWork
Return to VA Smalltalk 7.0, 7.5 & 8.0
Users browsing this forum: No registered users and 1 guest