Paula_apm

Hello!

I'm trying to create a DataBase .sdf in my mobile application, and I have this problem:

I need to create a collum in the DataBase for save images(Blob). I'm doing like this "CREATE TABLE PRODUTOS(CODE INT IDENTITY PRIMARY KEY NOT NULL, NAME NVARCHAR(30), PHOTO IMAGE(16));", Conn), and I received this message: "Error: The metadata for the large object is not valid"

What is happend Someone can help me, please

Tanks

Paula



Re: Smart Devices VB and C# Projects Data Base

Jose Miguel Torres

try...

CREATE TABLE PRODUTOS(CODE INT IDENTITY PRIMARY KEY NOT NULL, NAME NVARCHAR(30), PHOTO IMAGE)

instead of

CREATE TABLE PRODUTOS(CODE INT IDENTITY PRIMARY KEY NOT NULL, NAME NVARCHAR(30), PHOTO IMAGE(16)

regards




Re: Smart Devices VB and C# Projects Data Base

Paula_apm

Hi Jose Miguel,

Tanks for your help.

I Tryed what you said, but I received another error:

"ERROR: The identity column must be either an integer or big integer data type and cannot be NULL"

I don't known what I need to do for create this column IMAGE in my table.. :-(

Thanks

Paula





Re: Smart Devices VB and C# Projects Data Base

Jose Miguel Torres

this kind of error is not relationated with image type column. be sure with identity column. it must be numeric and don't allows nullable values. try to execute the statment with sql server mangment server. I tested it and all was ok....

if you need further info, feel free to post here...

regards,,,,