FYI: Automatically BIND variables 
Author Message
 FYI: Automatically BIND variables

Hi,

Some time ago people asked about an automatic BIND method, to get rid of all
sorts of errors.
This source I use, to autmoatically bind fields from a file MyFile, which
appear in the StringToEvaluate (=FilterString).
Just an idea, have fun!

i LONG
FieldName STRING(40)
FieldRef  ANY
RecordRef &GROUP

    CODE
     RecordRef  &= MyFile{Prop:Record}

     i = 1
     LOOP WHILE i <= MyFile{Prop:Fields}
        FieldName = MyFile{Prop:Label, i}
        FieldRef &= What(RecordRef,i)
        IF
INSTRING(UPPER(CLIP(FieldName)),UPPER(CLIP(StringToEvaluate)),1,1) <> 0 THEN
           CASE CLIP(EVALUATE(FieldName))
           OF ''
              BIND(CLIP(FieldName), FieldRef)         ! Bind field
           END
        ELSE
           CASE CLIP(EVALUATE(FieldName))
           OF ''
           ELSE
              UNBIND(CLIP(FieldName))                 ! Already binded,
unbind field
           END
        END
        i += 1
     END

--
Ronald van Raaphorst
Compad
Windbrugstraat 15-21
7511 HR  ENSCHEDE

Site: www.Compad.nl



Tue, 30 Sep 2003 16:12:17 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. FYI: (Un)Binding queue string fields

2. FYI: Information on a Perl binding for CORBA

3. Defining variables automatically

4. instance variables automatically accessible?

5. automatically naming a global variable

6. vw5i1 to Oracle 8 binding variable question

7. binding a variable for an sql query

8. No bind on variable View (801) attempting ot open the currewnt view

9. Error: (No Bind on variable(801))

10. Bind variables to pass to Microsoft Word Application.Wordbasic interface

11. Binding Oracle PL/SQL variable in VW2.5

12. No bind on variable (801)

 

 
Powered by phpBB® Forum Software