Invalid cursor states  Transaction rollbacks

Chapter 6: SQLSTATE Codes and Messages

Syntax errors and access rule violations

Syntax errors are generated by SQL statements that contain unterminated comments, implicit datatype conversions not supported by Adaptive Server or other incorrect syntax.

Access rule violations are generated when a user tries to access an object that does not exist or one for which he or she does not have the correct permissions.

Table 6-6: Syntax errors and access rule violations

Message

Value

Description

command permission denied on object object_name, database database_name, owner owner_name.

42000

Occurs when a user tries to access an object for which he or she does not have the proper permissions.

Implicit conversion from datatype ‘datatype’ to ‘datatype’ is not allowed. Use the CONVERT function to run this query.

42000

Occurs when the user attempts to convert one datatype to another but Adaptive Server cannot do the conversion implicitly.

Incorrect syntax near object_name.

42000

Occurs when incorrect SQL syntax is found near the object specified.

Insert error: column name or number of supplied values does not match table definition.

42000

Occurs during inserts when an invalid column name is used or when an incorrect number of values is inserted.

Missing end comment mark ‘*/’.

42000

Occurs when a comment that begins with the /* opening delimiter does not also have the */ closing delimiter.

object_name not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).

42000

Occurs when a user tries to reference an object that he or she does not own. When referencing an object owned by another user, be sure to qualify the object name with the name of its owner.

The size (size) given to the object_name exceeds the maximum. The largest size allowed is size.

42000

Occurs when:

  • The total size of all the columns in a table definition exceeds the maximum allowed row size.

  • The size of a single column or parameter exceeds the maximum allowed for its datatype.





Copyright © 2005. Sybase Inc. All rights reserved. Transaction rollbacks

View this book as PDF