Page 1 of 1

SQL Server Compact 4.0 and BLOBS

Posted: Sun 22 May 2011 13:03
by stojo303
Hi,

I'm trying to replace Access with SQL Server Compact 4 support in my application (written in Delphi 2010) and the most seems to work well.
One thing that does not seem to work properly is BLOB support.

I have tried these two versions of updating a BLOB field:

1)
(FQuery is of type TUniQuery, MS is a TMemoryStream)

with FQuery do
begin
SQL.Text := 'SELECT item_id, ItemPicture FROM tblItems WHERE item_id = 5';
Open;
try
Edit;
TBlobField(FieldByName('ItemPicture')).LoadFromStream(MS);
Post;
finally
Close;
end;
end;

The above code works well with Access, SQL Server and MySQL

2)

FQuery.Params.CreateParam(ftBlob, 'ItemPicture', ptInput);
with FQuery do
begin
SQL.Text := 'UPDATE tblItems SET ItemPicture = :ItemPicture WHERE item_id = 5';
ParamByName('ItemPicture').AsBlobRef.LoadFromStream(MS);
ExecSQL;
end;


In both cases a exception that does not help is thrown:

---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EOLEDBError with message 'Errors occurred. [,,,,,]'.
---------------------------
Break Continue Help
---------------------------

Anyone knows how to add BLOB support for SQL Server Compact 4 properly?


Thanks in advance.

Posted: Mon 23 May 2011 13:23
by AndreyZ
Hello,

Thank you for the information. We have already fixed this problem. This fix will be included in the next UniDAC build.

Posted: Mon 23 May 2011 13:52
by stojo303
Thanks for your reply and the good news!

Any idea when the new version will become available?
(Or will registered users get a chance to test a beta?)

Posted: Mon 23 May 2011 15:23
by AndreyZ
The next UniDAC build will be available in two weeks.

Posted: Wed 08 Jun 2011 18:47
by stojo303
AndreyZ wrote:The next UniDAC build will be available in two weeks.
Hi,

Do you have any more exact date of this release?
I'm eager to get the blob's tested :)

Thanks in advance.

Posted: Thu 09 Jun 2011 07:36
by AndreyZ
We are planning to release the new version of UniDAC this week or at the beginning of the next week.

Posted: Thu 09 Jun 2011 15:35
by stojo303
Cool, thanks for the update

Posted: Wed 22 Jun 2011 18:11
by stojo303
We are planning to release the new version of UniDAC this week or at the beginning of the next week.
Hi, any news on the release date?

Posted: Thu 23 Jun 2011 07:00
by AndreyZ
The new UniDAC version 3.70.0.18 is already available. Please use your link, username, and password for Registered Users' Area to download it.

Posted: Thu 23 Jun 2011 08:15
by stojo303
Thanks. I missed this since I thought new releases was announced in the forum also.

Thanks for your help.