Approaching Omnis again scares me, too much to learn?
To learn SQL check out the Query Builder that is available in the Omnis UI.
Once you have a SQL connection (that also can be an Omnis datafile) you can drag server tables to the white design space. Start with one table first. Select the columns that you want to display and click build&run. Then you can add a „Where clause“ to it.
Provided you have foreign keys in the tables (these are the fields that store the primary key value of the connected server table) you might then add another table and use the mouse to drag a line from the primary key of the father table to the foreign key of the child table. That generates the join.
Once you have a working SQL check out the additional button „other“. That allows you to create a table class that will have a method “$build“ or “$load“ inside that contains the statement you have designed.
Then create a window or a remote form and make an instance variable there. Chose as a subtype the table class that has been generated. Then you can do the following in the $construct of the window or form (let’s say your list is called iDataList):
Voila you have a SQL working. This code is going to load the data into the list.
All you need is a grid that will have the list name in its $dataname.
I hope this gives you a start. Also check out the video number 2 and 5 at developer.omnis.net/videos
> Am 04.01.2018 um 15:14 schrieb Jerry Greenberg <email@example.com>:
> Hi Das, basic SQL is actually pretty simple and for most desktop/dml type apps that’s all you’ll really need. Sure for ultimate efficiency you can create some complex SQL but for smaller apps it’s really not necessary. Learn the strategies of connecting your tables, learn your joins and you’ll be off to a running start.
> As you may recall I have been around Omnis since the 80s as well, and for a while on the Omnis Consulting team, and I have worked with many of the developers here and on numerous large projects and I think my best advice for you is this. Understand that much of what you read here on the list comes from developers that have or currently work on multi developer teams, for large companies, and on very large projects, and the techniques they use have some great advantages in that environment. But, to try and implement those techniques in a single developer environment is most likely counter productive, daunting and complex. You may want to learn some of those techniques down the line but you don’t have to use them.
> My suggestion is to learn basic sql, and forget about table classes, and query classes for now. (if you use them you won’t be learning your sql) Just use the schema classes, define your lists and rows from the schema classes, create some select statements, and use your notation skills to access the data. It’s a good start.
> oh btw. the sqllite database is a great little database which I look at as a great replacement to the datafile.
> Good luck,
> At 03:55 PM 1/2/2018, you wrote:
> Manage your list subscriptions at lists.omnis-dev.com
Manage your list subscriptions at lists.omnis-dev.com