View previous topic :: View next topic
|
Author |
Message |
Roshan_kr
New User
Joined: 13 Mar 2005 Posts: 2 Location: India
|
|
|
|
How can i insert a value into a BLOB field. |
|
Back to top |
|
|
MichaelKBS
New User
Joined: 10 Jan 2006 Posts: 24 Location: Germany
|
|
|
|
Hi,
you have to define a corresponding hostvariable first.
For example:
** COBOL-DECLARATION
** *******************
**
01 DCL-TABLE.
05 DCL-BLOB-COLUMN USAGE SQL TYPE
IS BLOB (8K).
**
** DECLARE-Statement
** ******************
EXEC SQL DECLARE tablename TABLE
(
BLOBCOLUMN BLOB
)
END-EXEC.
**
** INSERT
** ******
EXEC SQL
INSERT INTO tablename
(
BLOBCOLUMN
)
VALUES
(
:DCL-BLOB-COLUMN
)
END-EXEC.
regards,
Michael |
|
Back to top |
|
|
senthilssg
New User
Joined: 09 Dec 2005 Posts: 64 Location: USA
|
|
|
|
Hi MichaelKBS,
i want to know some points reg insert the value for blob column
Actually i followed the steps which are mentioned by you .
i declared working storage variable , table declaration in cobol- db2 pgm. How the progrm will know the image file for blob column?
where should i mention the image file which is going to be inserted into the value for blob column in the cobol program?
Please help me in that issue
Thanks in advance
Regards ,
Senthil |
|
Back to top |
|
|
|