This is a discussion on OO4O, BLOB, AddNew and "Row must be locked" within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Hi there, I have no success with inserting a BLOB into a new record. I always get the message ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi there, I have no success with inserting a BLOB into a new record. I always get the message "Row must be locked for this operation". My code: create table TEST ( MYBLOB blob default empty_blob() ); Dim objOraSession As OraSession Dim objOraDatabase As OraDatabase Dim objOraDynaset As OraDynaset Dim objOraField As OraField Dim objOraBlob As OraBlob Set objOraSession = New OraSessionClass Set objOraDatabase = objOraSession.OpenDatabase("database", "user/password", 2) Set objOraDynaset = objOraDatabase.CreateDynaset("SELECT * FROM test", 2) Set objOraField = objOraDynaset.Fields("myblob") Set objOraBlob = objOraField.value objOraDatabase.BeginTrans objOraDynaset.AddNew objOraBlob.CopyFromFile "d:\test.txt" objOraDynaset.Update objOraDatabase.CommitTrans When I first save the record and then use objOraDynset.Edit the operation succeeds. But I can't use this design in my application, I need to do all in one transaction, and the new record is only usable after commiting the transaction. Otherwise I will not be able to rolback the whole changes. So is there no way to lock a row when I use AddNew or is there another possibilty to do this? Many thanks for your help Wiwo |