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.
SDAC 4.35.0.14 TDALoader.OnPutData and "image"
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.
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.
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.
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.