I want to retrieve/store a blob(s) from an Oracle db onto the harddrive. Most of these blobs are .doc or .txt files.
Any suggestions on an efficient way to do this via script?
Everything I have read seems to be very complicated.
Thanks!:wave:
Printable View
I want to retrieve/store a blob(s) from an Oracle db onto the harddrive. Most of these blobs are .doc or .txt files.
Any suggestions on an efficient way to do this via script?
Everything I have read seems to be very complicated.
Thanks!:wave:
I should mention that I can connect to the db through sqlplus and retrieve information already. I am looking for simple retrieval logic only.
you want to just save the files or save the contents into a local database?
you can use fso to save files to whatever folder you want, there will be many examples of creating a scripting object and fso.getfolder
another option is to use api URLdownloadtofile quite a simple api to use
I am working at the retrieval logic for getting the blob.
I have used FSO without issue. I am just not sure of the commands to retrieve the blob.
I am not using http, rather pure vbscript.
Thanks!
Not sure it cvan be done in vbscript. But look at this:
http://www.planet-source-code.com/UR...ue/Posting.htm
or:
http://www.oracle.com/technology/sam...ock/index.html
I think in both cases you will need to convert to a bitstream and append the steam together before tying to wite to a file.
I have found lots of information on this process, but I keep stumbling at the query. Maybe it is a fileblock size problem?
Utilizing adodb connection and commands,
vb Code:
rs.Open "SELECT id, blob FROM attachments WHERE id = 673", conn
produces;
run time error -2147467259(80004005)':
unspecified error
Any thoughts?