473,396 Members | 1,935 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Inserting a value for a BLOB field using an SQL script

I am writing an SQL script for Oracle 9i. I have a table of which one field
is of type BLOB. I would like to create an SQL script to add records to this
table. What do I do to take a file and use it as the value for this field? I
know how to use the function EMPTY_BLOB() as the value, but I have been
unable to find a function that takes an actual image file and use it as the
data. Can someone give me an example or tell me a site where I can find one?
Any help would be appreciated. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
www.nathansokalski.com

Jul 19 '05 #1
1 5309
Nathan Sokalski wrote:
I am writing an SQL script for Oracle 9i. I have a table of which one field
is of type BLOB. I would like to create an SQL script to add records to this
table. What do I do to take a file and use it as the value for this field? I
know how to use the function EMPTY_BLOB() as the value, but I have been
unable to find a function that takes an actual image file and use it as the
data. Can someone give me an example or tell me a site where I can find one?
Any help would be appreciated. Thanks.


Please do not cross-post to every usenet group you can spell. You have
to know your request relates to only a single usenet group if you
bothered to read the charters to paid any attention to previous postings.

The whipping delivered you can find the solution at:
http://www.psoug.org
click on Morgan's Library
click on DBMS_LOB

The stored procedures can just be run as a SQL script if slightly
modified to be anonymous blocks.
--
Daniel A. Morgan
University of Washington
da******@x.washington.edu
(replace 'x' with 'u' to respond)
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: tornado | last post by:
Hi all, I am pretty new to PHP. I was reading PHP manual and trying out the example from 2nd chapter (A simple Tutorial). When i try to print the variable as given in the example it returns...
7
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function...
2
by: clinttoris | last post by:
Hello, If someone could help me it would be appreciated as I am not having much luck. I'm struggling with my asp code and have some questions relating to asp and oracle database. First...
0
by: Harshadcode | last post by:
Hi, This is HARSHAD, I am creating a project in VB.NET for managing details like photos of criminals. but i am facing problems in converting a image in to filestream so that it can be inserted in...
11
by: krishnakant Mane | last post by:
hello, I finally got some code to push a pickled list into a database table. but now the problem is technically complex although possible to solve. the problem is that I can nicely pickle and...
1
by: Bhavesh | last post by:
Hi Bruce, Thanks For Reply. U were right, Needed to pass string , but also need to pass size of Data( instead of 16, passed actual length of data). So that worked for me & didn't get any...
0
by: jparulan | last post by:
I'm trying to insert a TIF image to ORACLE database 10g using ODP.net and also tried OleDB but I was not successful. Anybody can shed a light? this.TIFFIMG = OCRdir + "\\" +...
1
by: Nathan Sokalski | last post by:
I am writing an SQL script for Oracle 9i. I have a table of which one field is of type BLOB. I would like to create an SQL script to add records to this table. What do I do to take a file and use...
5
by: atlanteavila | last post by:
Hello all, I have a problem with inserting text with quotes, or html code in to a MYSql Database. I've been trying to create my own content management system, and unfortunately I've come accross a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.