Page 1 of 1

SDAC 4.35.0.14 TDALoader.OnPutData and "image"

Posted: Fri 05 Feb 2010 10:05
by PaulT2
I successfully use Loader.OnPutData for many tables and datatypes, but I'm currently failing with the "Image" datatype.

for jLoop := 0 to Sender.Columns.Count-1 do
Sender.PutColumnData(jLoop,iCounter,Query.Fields[jLoop].AsVariant);

The above will not fail, but data in an underlying "Image" field will be corrupt. All other fields on the table process as expected. Examining Senser.Columns.Items[jLoop].FieldType I can see that ftBlob is returned, but beyond that I can't proceed.

This is a problem as I'm trying to fully move some old code using OLEDBComponents in to SDAC. In these old components, I handle an image field as follows:

MemoryStream.Clear;
TBlobField(Query.Fields[jLoop]).SaveToStream(MemoryStream);
MemoryStream.Seek(0,soFromBeginning);
biBinding.LoadFromStream(MemoryStream);

Do I need to do something similar with SDAC ?

Thanks,

Paul.

Posted: Fri 05 Feb 2010 10:43
by Dimon
Please, try to download the latest SDAC build (4.80.0.55) and check if this problem still exists.

Posted: Fri 05 Feb 2010 11:49
by PaulT2
Dimon,

I have installed 4.50.039 as is the last version before our subscription ran out. Testing this version results in the following :-

1) The nature of Blob field problem has changed. It appears to work fine under SQL 2005, however when connecting to SQL 2000, we get :

Acces violation at address 337A18F9 in module sqlncli10.dll. Read of address 7F0A0026.

EMSError 'Received invalid column length from bcp client'

2). I am also now seeing another related error, which I believe will be related to fields of type "ntext". These appear to work under SQL 2000, but not SQL 2005. Under SQL 2005 the error "Invalid character value for cast specification" is thrown. The only unique thing about the table being processed is the "ntext" field.

I'd be grateful if you could advise on these follow ups. If you think ther is merit in the latest release, I'll install that in a test development environment.

Regards,

Paul.

Posted: Fri 05 Feb 2010 12:24
by PaulT2
Dimon,

Further to my last post, I've now installed the latest trial edition and can confirm that the original blob issue appears to have been resolved on both SQL 2000 and 2005.

However the "ntext" issue remains a problem. After further testing, although no error is thrown on SQL 2000, the values in the field do NOT populate correctly. SQL 2005 throws the error as previously described.

I will coninue testing further, but if you could offer some advice I'd be grateful.

Regards,
Paul.

Posted: Mon 08 Feb 2010 07:50
by Dimon
I can not reproduce the problem.
Please send me a complete small sample to dmitryg*devart*com to demonstrate it, including the script for creating database objects.

Posted: Mon 08 Feb 2010 15:58
by PaulT2
I've just sent you a small sample project via email.

Paul.

Posted: Tue 09 Feb 2010 10:02
by Dimon
Thank you for information. We have answered you by e-mail.