Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

SQL Server 2000 datatype for templates is?

edited July 2003 in General
All,

I am converting an application from DBISAM to SQL Server 2000. I have tried
using both VarBinary and Image datatype for the column where I want to store
my report specifications (as binary). Neither of these appear to work. What
is the correct datatype for storing report templates in SQL Server 2000?

TIA,

Mike Austin

Comments

  • edited July 2003
    Hi Mike,


    /* create item table */

    CREATE TABLE rb_item
    (item_id INTEGER NOT NULL IDENTITY (1, 1),
    folder_id INTEGER NOT NULL,
    item_name VARCHAR(60) NOT NULL,
    item_size INTEGER,
    item_type INTEGER NOT NULL,
    modified DATETIME NOT NULL,
    deleted DATETIME,
    template IMAGE,
    PRIMARY KEY (folder_id, item_type, item_name, modified) );

    CREATE INDEX item_id_idx ON rb_item (item_id);
    CREATE INDEX folder_item_name_idx ON rb_item (folder_id, item_type, item_name);


    field type 'IMAGE' should work.
    What is your concrete problem?

    regards,
    Chris Ueberall;
  • edited July 2003
    Thanks, Chris!

    I am using an Image data type. When I run the app from the IDE I get a
    "Cannot store a template to a field of this type" error. I do not get this
    error at run-time.

    Mike

  • edited July 2003
    Hi Mike Austin,


    Instead of using an Image datatype, there is a Binary datatype which can be
    used to store the report template in SQL Server 7.


    I am getting this exception on startup too (using another database) but it doesn't harm my application in any way, I can ignore it.

    regards,
    Chris Ueberall;
  • edited July 2003
    Thanks, Chris!

    Initially, I tried using the VarBinary(8000) as the data type and it
    wouldn't work. I will see if I can save reports at design-time...

    Mike

This discussion has been closed.