Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Retrieve IMAGE blob datalength

Author  Topic 

abhijeetshiral
Starting Member

2 Posts

Posted - 2009-06-30 : 04:46:14
I am using IMAGE blob here.
And when retrieving the data from the server using OLE DB interfaces, as we do not specify any length for type IMAGE.

Hence here GetColumnInfo() method return the max size that is allowed by server, and when we trim it, it can not be trimmed properly, like leaving spaces and NULLs and corrupts the file.

Any suggestion on using different method for getting and trimming the data.

Regards
Abhijeet S

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-06-30 : 05:07:20
DATALENGTH(Col1)



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

abhijeetshiral
Starting Member

2 Posts

Posted - 2009-06-30 : 08:11:19
Yes, DATALENGTH (col1) is one option. But what if user will execute a SQL command (SELECT <blobcolumn>) which will directly fetch column first.

I should have put those specification before, sorry for that


Regards
Abhijeet S
Go to Top of Page
   

- Advertisement -