PRB: Double Quotation Mark Params Error w/ Quoted Identifiers (135531)
The information in this article applies to:
- Microsoft SQL Server 6.0
- Microsoft SQL Server 6.5
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);
Modification Type: | Major | Last Reviewed: | 10/16/2003 |
---|
Keywords: | kbprb kbprogramming KB135531 |
---|
|