View previous topic :: View next topic
|
Author |
Message |
zishankamal
New User
Joined: 07 Apr 2006 Posts: 7
|
|
|
|
Is DECLARE TABLE in DCLGEN necessary?
As far as I know, 'DECLARE TABLE' in DCLGEN is used by the pre-compiler to validate the table name, view name, column name etc., during precompilation. if Declare table is not specified, then how table name, view name etc will be validated in the precompilation? |
|
Back to top |
|
|
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
Hi Zishan Kamal,
If DCLGEN Table declaration is not mentioned then table name will be validated while bind. Column name will be validated while run time |
|
Back to top |
|
|
zishankamal
New User
Joined: 07 Apr 2006 Posts: 7
|
|
|
|
Thanks Surya. But i am still confused.
You said, "If DCLGEN Table declaration is not mentioned then table name will be validated while bind."
But if Table declaration is not there at the time of precompilation, then how the DBRM will be created. And if DBRM is not created, then how can we BIND... |
|
Back to top |
|
|
twissi
Active User
Joined: 01 Aug 2005 Posts: 105 Location: Somerset, NJ
|
|
|
|
zishankamal,
It's not mandatory that you've DCLGEN Table structure in the program, but if you have, the Pre-complier validates the field name, etc and throws you a warning at precompile stage.
DBRM is not created from DCLGEN, rather they're created from the SQL statements that you would have used in the program.
At the BIND stage, the SQL statements taken from the DBRM are validated and an error is thrown if an issue's found.
In brief, DCLGEN is an added feature that you may or may not use in the program.
Does this make sense?
Cheers, Twissi. |
|
Back to top |
|
|
zishankamal
New User
Joined: 07 Apr 2006 Posts: 7
|
|
|
|
Yeah, it makes lots of sense. Thank You Twissi. |
|
Back to top |
|
|
ashish singh
New User
Joined: 01 Dec 2006 Posts: 1 Location: delhi
|
|
|
|
kamal i m agree with u |
|
Back to top |
|
|
|