The identifier that starts with....is too long. Maximum length is 128.

  • I have a SP that recieves parameters except that when sending down one parameter I get the following error.

    The identifier that starts with....is too long. Maximum length is 128.

    I have one parameter that is passing a length of 140.

    Is there a way to increase this size pass 128?

    Thanks

     

  • AFAIK, nope.

    BOL states the max identifier length as 128 characters. Can't go beyond that.

    /Kenneth

  • here're some links that could provide you with workarounds....

    source 1

    source 2

    source 3

    sql 7.0







    **ASCII stupid question, get a stupid ANSI !!!**

  • Ah, now I understand the problem (duh)

    Don't use double quotes around strings, use single quotes. This is the most bulletproof solution, since then it doesn't matter if QUOTED_IDENTIFIER is set to either OFF or ON. Remember, in Transact-SQL, always use single quotes, never double quotes.

    If, somehow you can't avoid to use double quotes denoting strings, then you must ensure that for the connection QUOTED_IDENTIFIER is set to OFF. It's a bit more hassle this way, since each connection can override the serversetting - you have to enforce this everywhere in the clientcode making the connection...

    /Kenneth

  • Single quote should be used when passing String to a query or Stroed Procedure in Transact SQL

  • Thanks guys! the single quote idea worked for me.

  • I am getting the exact same error. I have a huge binary file and I want to pass the binary content (as is) from Visual FoxPro to SQL Server using insert command or update command. I am getting this error. Is there a way to bypass this error?

    My SQL command looks like this

    insert into Settings (SettingVal) values (cast (long binary string here as varbinary(max)) -- tried using image with the same result.

    May be I should try adding single quotes around the varbinary value?

Viewing 7 posts - 1 through 6 (of 6 total)

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