views:

156

answers:

1

How to specify blob type in MS Access? I have office 2007 installed.

I am using jdbc, but this should not matter for the SQL query I am passing. Tried to pass a length to it, or FILE type, did not help.

CREATE TABLE  mytable  (
  [integer] INTEGER not null,
  [string] VARCHAR (255),
  [datetime] DATETIME,
  [boolean] BIT,
  [char] CHAR,
  [short] SHORT,
  [double] DOUBLE,
  [float] FLOAT,
  [long] LONG,

  [blob] BLOB, // does not work

  Primary Key ([integer])
)
+2  A: 

Use LONGBINARY as the data type for the blob field in your DDL statement. See Field type reference - names and values for DDL, DAO, and ADOX

HansUp
Agreed. LONGBINARY = OLE Object which is where to store BLOBs.
Remou
http://support.microsoft.com/kb/194975 says you can store BLOBs in OLE or Memo fields in Jet (the article predates ACE, but I'd expect it to be the same, though the attachment field might change that). This article http://support.microsoft.com/kb/103257/EN-US/ (Access 1 to Access 97) and this article http://support.microsoft.com/?kbid=210486 (A2000) say that OLE only works if there's a registered OLE server for the data stored in the field.
David-W-Fenton