shalem
New User
Joined: 11 Apr 2005 Posts: 8
|
|
|
|
There is difference between syntax checking in Precompiler and Bind.If delimiters surround an SQL statement, the precompiler does a very basic syntax check to make sure that the column and table names are valid (that they're spelled correctly and that the columns and the table exist).This validation is not done by DB2 or its CATALOG.The DB2 Precompiler uses the top part of the DCLGEN to validate the SQL syntax.
BIND, like precompile, must also check the syntax of the SQL, but the BIND check is more sophisticated. Instead of using the top, DECLARE TABLE portion of the DCLGEN, BIND uses the DB2 CATALOG table information to make sure that the column names are valid, that comparisons are numeric-to-numeric, and so on. This second syntax check occurs because you can't trust the one done by the precompiler because the precompiler check used the DCLGEN. |
|