locked
How to set a SQLDataSource InsertParameter default value of type DBType=Binary RRS feed

  • Question

  • User450294487 posted

    This is a variation on a question I asked earlier.

    I have a SQLDataSource1 and a InsertParameter called AttachmentData of type "DBType=Binary".

    I want to load the parameter from a Byte array called Buffer.  Dim Buffer as Byte().

    this works from inside an Inserting event:

    e.command.parameters("@AttachmentData").value = Buffer

    But I need to do it from a prior event so I'm trying this.

    SQLDataSource1.InsertParameters("AttachmentData").defaultvalue = Buffer

    It gives the error:

    Value of type "1-dimensional array of Byte' cannot be converted to 'String'.

    What can I do?

    Thursday, September 3, 2015 10:50 AM

Answers