save OLE object via TOracleDataset

ehamlin

Member
How can I save an OLE object (i.e., a Word doc instance) to a LONG via a TOracleDataset? I tried using SetLongVariable but keep getting "Variable
biggrin.gif
ocImage is not a Long." What's wrong?
 
The :DocImage variable must be declared as type Long (otLong at runtime). Apparently this is not the case.

------------------
Marco Kalter
Allround Automations
 
Originally posted by mkalter:
The
biggrin.gif
ocImage variable must be declared as type Long (otLong at runtime). Apparently this is not the case.

I did have it defined as otLong at design time, but setting it at runtime as you proposed did remove the original problem. Now, however, Oracle gives me back an ORA-01465, Invalid hex number. The docs indicate that this means the ROWID was mangled on a SELECT FOR UPDATE, which I am not explicitly doing--is DOA doing one behind the scenes? It isn't working for some reason. My SQL is an insert in which the last variable is the otLong. I pass the Word doc instance as an OLE object; tried casting it as TBlobByteData but same error. Any advice? I'm stumped! TIA Marco, Ed
 
The error message indicates that the column that you are trying to update through this variable is in fact a long raw. Therefore you must also use the LongRaw variable type (otLongRaw at run-time).

------------------
Marco Kalter
Allround Automations
 
Back
Top