Passing Images to WebService method vis SSIS Package - issue with GetBlobData method

  • Hi,

    I'm designing a package which should read the image column from the database and pass the image to webservice method.

    I'm using the OLE DB as a source followed by/connected to script component which converts the image column (which is a type of BLOB) to a byte array. as shown below:

    Microsoft.SqlServer.Dts.Pipeline.BlobColumn objFaxImage = Row.Image;

    byte[] faxImage = objFaxImage.GetBlobData(0,(int)(objFaxImage.Length));

    objResMsg = objFaxComSVC.WebMethod("file", faxImage); //Webservice Call

    The code in the script works fine until it gets to one of these very large parameter sets. I have figured out what is causing the issue. Here's some code:

    byte[] faxImage = objFaxImage.GetBlobData(0,(int)(objFaxImage.Length));

    The second parameter of the .GetBlobData function takes an INTEGER as its count! Therefore, it will be limited to 32767 characters and it'll truncate the image.

    THIS IS A PROBLEM!!!

    Does anyone know a workaround for this issue?

    Not sure if there is any other way to perform this.

    My development environment is BIDS 2008.

    Thanks in advance.

    Thanks.

    Gunjan.

  • I don't think an integer is anywhere near that small, see: http://vb.net-informations.com/language/vb.net_data_types.htm

    CEWII

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply