Table B - image column
1. When using the 'image' column in Table B, my code is able to successfully
write to the table using the .AppendChunk method on the field.
2. I am able to successfully read the 'image' column using .GetChunk
Table A - text column
3. I update the column and table name to access Table A and the 'text'
column.
4. I am able to successful write to the 'text' column using .AppendChunk
5. Reading the 'text' column with .GetChunk fails with the following
message---
dump.vbs(111, 9) Microsoft OLE DB Provider for ODBC Drivers: Multiple-step
OLE DB operation generated errors. Check each OLE DB status value, if
available. No work was done.
I can verify that Table A does contain the values written by viewing with
the SQL Server Management Studio and opening the table. I can do a SELECT
and view the content as well. I need for this to be a 'text' column because
it must be fulltext indexed.
oStream is an ADODB.Stream object, oRS is an ADODB.RecordSet.
Here is the write to the field:
oStream.Type = 1
oStream.Open
oStream.LoadFromFile sImageFile
oRS.AddNew
oRS("DocImage").AppendChunk(oStream.Read)
oRS.Update
Here is the read:
oStream.Type = 1
oStream.Open
oStream.Write rsImage(sFldName).GetChunk( rsImage(sFldName).ActualSize )
oStream.SaveToFile sFilename, 2
oStream.Close
I have added debugging code to write the query to the output window, then
copied and pasted it into a Query window and it runs returning data so that
doesn't seem to be the failure.
Is there another way to extact the text from a 'text' file in ADO 2.8 ?