|
-
Sep 17th, 2007, 11:43 AM
#1
Thread Starter
New Member
Retrieve Oracle blob via vbscript
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!
-
Sep 17th, 2007, 11:59 AM
#2
Thread Starter
New Member
Re: Retrieve Oracle blob via vbscript
I should mention that I can connect to the db through sqlplus and retrieve information already. I am looking for simple retrieval logic only.
-
Sep 18th, 2007, 07:31 AM
#3
Re: Retrieve Oracle blob via vbscript
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 do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Sep 18th, 2007, 08:19 AM
#4
Thread Starter
New Member
Re: Retrieve Oracle blob via vbscript
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!
-
Sep 18th, 2007, 08:35 AM
#5
Re: Retrieve Oracle blob via vbscript
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.
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Sep 19th, 2007, 12:28 PM
#6
Thread Starter
New Member
Re: Retrieve Oracle blob via vbscript
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|