midrange.com code scratchpad |
Name:
SQL File Encapsulation
|
Scriptlanguage:
Plain Text
|
Tabwidth:
4
|
Date:
04/03/2012 09:18:00 pm
|
IP:
Logged
|
|
Description:
Example of file encapsulation with SQL. Wondering if the Chain could be streamlined at all.
Flow of code:
Call to $DeclarePacName1. This sets the keys that will be used.
The intent right now is to have different $Declare... per logical/index. I had toyed with the idea of only one, where you send the fields you want to use and *omit the others, but I think that's less intuitive. (The name of the procedure could probably also change to be like $SetPacNameKey or something.
After that is called, which dynamically creates the cursor, the caller would call $ChainPacNameP. Even if there were 10 different $Declare procedures, only the one $Chain procedure would be needed as the SQE would pick the appropriate index based on the where statement.
|
Code:
|
|