dcsimg
Results 1 to 5 of 5

Thread: Query anaylzer not accepting varbinary data Maximum length is 128.

  1. #1
    Join Date
    Jul 2010
    Posts
    3

    Query anaylzer not accepting varbinary data Maximum length is 128.

    Hi im running a query in query analyzer
    its giving me an error about the varbinary values, after checking for this issue from various searches its meant to be from enclosing data in double quotes which mssql then takes as colomn names but i dont have any double quotes in this code

    can anyone work out why its not liking this

    Thank you

    Code:
    declare @var1 varbinary(1920)
    declare @var2 varbinary(1920)
    set @var1=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF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FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00593700C9489A000070000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0BC93600C9489F000040000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF005D3700C9489C000090000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0E000100C93DD90000E0000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0DBD4600C93D30000060000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF19393C00C9489E0000D00000000000000C080200C93DEC0000E000000000000000382C00C93DB4000070000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0CBD4D00C93D35080060000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF16413E00C948990000D000000000000010000100C93DB10000E0000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF09FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1A394B00C9489D0400D000000000000009393C00C93D340000D0000000000000283C3400C9315E0000A0000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00382C00C9315D000070000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF15413E00C93D320000D00000000000000D000100C93D310000E0000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    set @var2=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF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FFFFFFFFFFFFFFFFFFFFF005D3700C9489C000090000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0E000100C93DD90000E0000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0DBD4600C93D30000060000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF19393C00C9489E0000D00000000000000C080200C93DEC0000E000000000000000382C00C93DB4000070000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0CBD4D00C93D35080060000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF16413E00C948990000D000000000000010000100C93DB10000E0000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF09B13000C93119000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1A394B00C9489D0400D000000000000009393C00C93D340000D0000000000000283C3400C9315E0000A0000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00382C00C9315D000070000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF15413E00C93D320000D00000000000000D000100C93D310000E0000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    update warehouse set items=@var1 where AccountId='myAccount' and items=@var2
    This is the error output in the Messages tab of query anaylzer
    Code:
    Server: Msg 103, Level 15, State 7, Line 3
    The identifier that starts with 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' is too long. Maximum length is 128.
    Server: Msg 103, Level 15, State 1, Line 4
    The identifier that starts with 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' is too long. Maximum length is 128.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    You can change that in tools -> options -> query result set.

  3. #3
    Join Date
    Jul 2010
    Posts
    3

    no luck changing options

    Im using mssql 2000 version i dont have query result set as one of the options

    I tried all the options under scripting->Identifier delimiter
    I tried fiddling around with any of the likely options in connection properties

    I couldnt find any other options that look like they affect the varibles or quoting or anything like that

    no luck

    I am just testing this code in the anaylzer i will need to port it out to php later so i cant just make it work in the one area i dont think anaylzer changes will affect normal sql querys?

    Thx for helping rmiao

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    In query analyzer -> tools -> options -> results -> max characters per column.

  5. #5
    Join Date
    Jul 2010
    Posts
    3

    not working

    Thx for replying ive tried setting the
    options->results->Max characters setting to 2000, 2500 and 8000 from the original setting of 250

    these settings dont change anything it still doesnt execute the query with the same error

    Ive tried closing and reloading query analyzer with no luck

    The error specifically mentions 128 being the maximum size and the field wasent set to that originally anyway so maybe there is a different issue

    I think this is the result dataset size so it just works out how far spaced apart the colomns are its not the input data size and thats where the sql is failing

    Thanks

    Edit

    Finally solved it

    it wasent recognising the varbinary data as varbinary for some crazy sql reason and was most likely casting it to some other data type which has the limit of characters

    adding 0x infront of the varbinary data fixed the issue

    set @var1=0xFFFFF...
    Last edited by duindain; 07-28-2010 at 08:13 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •