Another SQL beginner but old with Omnis DML

Juan Bofill juanbofillaba at gmail.com
Sun Sep 6 10:08:00 EDT 2020


Hi all!

I followed the Omnis SQL tutorial in my old Omnis 4.3.2.1 version of Omnis and it all went well until I found there where no “Find” button in any of the Wizard created windows. Finally came up with this little solution for a “Find” push button:

On evClick
OK message  {$cobj().$name=[$cobj().$name] $cfield().$name=[$cfield().$name] $ctarget().$name=[$ctarget().$name] $cwind().$name=[$cwind().$name]}
Calculate lName as $cwind().$name
Calculate lContent as $ctarget().$contents
Calculate lFieldname as $ctarget().$name
Calculate lTarget as con('where ',lFieldname,' >= ',"'",lContent,"'",' ORDER BY ',lFieldname)
Do iSqlRow.$select(lTarget)
Do iSqlRow.$fetch() Returns lStatus
If lStatus=kFetchFinished|lStatus=kFetchError
Do iSqlRow.$select(con('where [$ctarget().$name]>',lTarget))
Do iSqlRow.$fetch() Returns lStatus
End If
Calculate iOldRow as iSqlRow
Do $cwind.$redraw()

It actually works real well so far. Welcome to hear any other ways of doing this.

Also have a structure to open all my four future  Sql libraries that handle its corresponding sessions and it seems to work. What gets me from covering the whole thing at this point are the REPORTS that are more than 100 of them. Any advise on conversion of some sort ?

Thanks

Juan Bofill


 


More information about the omnisdev-en mailing list