SQL worker objects

Das Goravani das at Goravani.com
Sat Jan 27 20:46:15 EST 2018


Given this code from the Manual

Do work.$definefromsqlclass('scWork')  ;;scWork is defined as query(char) and
 bindvars(list)
 Do work.$add('select * from table1 where col1 < @[binds1.col1]',binds1)
 Do work.$add('select count(*) from table1',)
 Do work.$add('select * from table2 where idCol >= @[binds2.idCol]',binds2)
 Do work.$add('select oneCol from table3',)
 Do initRow.$definefromsqlclass('scWorkInit') ;;scWorkInit is defined as
 hostname(char), username(char), password(char) & work(list)
 Do initRow.$add(lHostname,lUsername,lPassword,work)
 Do iWorker.$init(initRow) Returns #F
 Do iWorker.$start() Returns #F

What does the list of binds1 and binds2 actually contain
Where binds1 and binds2 appears in the where clause, what do they mean, being there, and matching the list
I basically don’t get binds1 and binds2
I have heard of and seen bind variables in select statements but am not clear on their syntax 


More information about the omnisdev-en mailing list