How to append the Binary data's in SQL2000.

  • From Java,Using the MS JDBC Driver

    I want to Append the binary data's in Image data type column in SQL2000 server.

    Like i have inserted a record with some binary data's, then within the sane block i want to

    append some more binary data's.

    1.How to append the data's ? Like what is available in the Blob putBytes().

    2.How to look for a byte pattern in the Image Data type ?

    Like what is available in the Blob position();

    3.How to updata from the ResultSet ?

    Solution ASAP

    Regards,

    All the Best,


    Regards,
    All the Best,

  • You can use STUFF:

    STUFF

    Deletes a specified length of characters and inserts another set of characters at a specified starting point.

    Syntax

    STUFF ( character_expression , start , length , character_expression )

    Arguments

    character_expression

    Is an expression of character data. character_expression can be a constant, variable, or column of either character or binary data.

    start

    Is an integer value that specifies the location to begin deletion and insertion. If start or length is negative, a null string is returned. If start is longer than the first character_expression, a null string is returned.

    length

    Is an integer that specifies the number of characters to delete. If length is longer than the first character_expression, deletion occurs up to the last character in the last character_expression.

  • Stuff is NOT working with image data type, you CAN'T append binary data into image data with STUFF.

  • This is not directly related to Java, but see, if it helps:

    http://www.microsoft.com/resources/documentation/sql/2000/all/reskit/en-us/part3/c1161.mspx

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

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