cancel
Showing results for 
Search instead for 
Did you mean: 

ASIQ load problem, help needed

Former Member
0 Kudos

I have the following table into which an imaghe file will be loaded on daily basis: 

CREATE TABLE Image_tbl

(

  ci_image_ind   char(30) NULL,  

    ci_image              image    NOT NULL,

  ci_load_date   date     NULL

   

)

When I run the following load command, it fails giving the below message:

load table MYUSER.Image_tble

(

ci_image

)

using client file 'd:/xxx/yyy//IMAGE.TIF'

ESCAPES OFF

QUOTES OFF

FORMAT BINARY

Could not execute statement.

   The datatype of column 'BLOB' is not valid.

   -- (db_sqlins.cxx 13703)

   SQLCODE=-1013037, ODBC 3 State="HY000"

   File: "ld_4864" on line 1, column 1

   load table MYUSER.Image_tble

   (

   ci_image

   ...

Have tried to find out teh reason of failure with no success, at least not on the SAP-Sybase documents. Please help me undestand what is wrong in my load statement.

Accepted Solutions (0)

Answers (1)

Answers (1)

tayeb_hadjou
Advisor
Advisor
0 Kudos

Hi Rameau,

The error message could be somehow misleading. Try load without "Format Binary".

Loading large objects has a couple of specifications to consinder.

I can read this from IQ manuals :

Large Object Data Loads

"You can load large object data of unlimited size, unless restricted

by the operating system, from a primary file in ASCII or BCP format.
The maximum length of fixed-width data loaded from a primary file
into large object columns is 32K - 1."

Extended LOAD TABLE Syntax

"Sybase IQ does not support loading large object columns from primary files using LOAD TABLE…FORMAT BINARY.

You can load large object data in binary format from secondary files."

Hope this helps.

Regards,

Tayeb.

markmumy
Advisor
Advisor
0 Kudos

In order to load binary data, you have to follow a two step process.  The first file contains a pointer to the actual file to be loaded.  The second set of files are those referenced in the first file.

You cannot do as you are trying which is to load a TIF directly into a cell.

http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01268.1600/doc/html/san1278530819529...

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01268.1600/doc/html/san12...

Mark

Former Member
0 Kudos

Thanks to both Mark and Tayeb and Mark. It works perfectly well. Next time I shall read teh mauanl more carefully before asking questions.

tayeb_hadjou
Advisor
Advisor
0 Kudos

No problem. The error message is confisung as well!

For information, an Engineering change request CR#606692 is logged to give a clear error message in next releases.

Btw, disucssions in SCN are interactive source to share concerns and knowledge. So, Welcome !

Mark, thanks for the clarfications. I appreciate!

Regards,

Tayeb.