Answered Reading / Writing Blobs Via Windows Odbc Driver

Chris Hughes

ProgressTalk.com Sponsor
Hi all

Just wondering if anybody would be able to share a coding example of reading and writing BLOBS to OpenEdge 10.2b or above via the Windows based OpenEdge ODBC driver.

I want to avoid JDBC if I can.

Not bothered what language the code is, I'm more interested in somebody telling me / showing that it works.

Would the ODBC driver (System DSN) need any extra configuration i.e. "WorkArounds" set?

Thanks in Advance

Chris.
 

TheMadDBA

Active Member
Don't have any code handy on this machine.... but there are a few things you need to do to make it work.

You have to execute a prepared statement (bind variables) instead of just using a standard insert with the values.

Make sure you are on at least 10.2B04 or the lob storage will grow much faster than it should http://knowledgebase.progress.com/articles/Article/P183457

You will have to change the DefaultLongDataBuffLen value to something large enough to store the lobs. The default is 2MB. You can either change the registry entry or add it to the DSN definition.

It may not be speedy if you are trying to do a bunch of inserts, but it does work.
 
Top