Article ID: 135531
Article Last Modified on 10/16/2003
APPLIES TO
- Microsoft SQL Server 6.0 Standard Edition
- Microsoft SQL Server 6.5 Standard Edition
This article was previously published under Q135531
SYMPTOMS
If you enclose a character string in double quotation marks that is over 30
bytes long, the application may receive the error:
Msg 103, Level 15, State 2
The identifier that starts with 'a' is too long. Maximum length is 30.
CAUSE
SQL Server version 6.0 does not always flag stored procedure parameters
enclosed in double quotation marks if the SET QUOTED_IDENTIFIER ON option
has been issued.
RESOLUTION
Change the procedure call to enclose the parameter values in single
quotation marks:
execute myproc 1, 'abcdefghijklmn'
ODBC applications can also use bound parameter markers instead of
providing the values directly using either proprietary Transact-SQL
syntax:
SQLExecDirect(hstmt, "execute myproc ?,?", SQL_NTS);
or, the ODBC standard syntax:
SQLExecDirect(hstmt, "{ call myproc (?,?)}", SQL_NTS);
Additional query words: sql6 delimiters string constants
Keywords: kbprogramming kbprb KB135531