Re: NewEra Demo code bugs
Posted in 1995
In article <Pine.HPP.3.91.950822123804.16704A-100000@lynx.informix.com> "Ken Gonzalez - PSO - Irvine, CA" <kengon@informix.com> writes: >Hi, > >On Sat, 19 Aug 1995, Peter Wiley wrote: > >> Now, a question. I can add a row to orders and hit the apply button. All >> appears OK; the serial number is incremented properly, I can fetch another >> customer's details, come back and my new data row is still present. >> However, once I exit the window then re-run it, my inserted row(s) have >> vanished. > >The thing that you want to keep in mind is that you are working with the >result set, not the physical row. Two topics to research here are >applyRowSQL and ixSQLConnect.transact(). The latter will have your data >be applied to the database. > I fail to see how this is new; in 4GL we're always working with a result set rather than the actual database row. The problem was a transaction one, true. However, I don't think it particularly clever to begin a transaction then leave it up to the programmer to COMMIT it. Either the default code on the std APPLY ALL button does both sides, or neither. >There are several things that need to be considered in your explorations. >The first is the requirement that the ixSQLxxxx classes are designed to: > 1. Be portable across different operating systems > 2. Be ODBC compatible > So is Progress and maybe others. >These, in the long run, help to ensure that your application is source >compatible across multiple platforms with few/no source changes. I would >suggest that while you learn about super tables and super fields that you >thouroughly investigate the database connection objects and understand >how they *really* work. Code a few up by hand. Then, when you start >working on super tables again, you will understand what is going on >underneath the covers. Best of luck to you. > >Ken I'd love to, if I had unlimited time to do it in. As I don't, I have a basic expectation that the manuals will be accurate and useful. These manuals aren't. Go and buy Delphi and compare its manuals with NewEra. The docs on ixSuperField and ixSuperTable alone total over 120 pages, with god alone knows how many methods, most of which have no example code to demonstrate correct use. I was playing with ixSuperField, for example. The insertText() method works as described; deleteText() doesn't. eg insertText("100000") displays 100000 in the field. deleteText(1,6) does nothing. Why? No clues in the manual and no example code. This is just one trivial example. No doubt I could make it all work, if I spent sufficient time on it. But I expect better than this. It took me 5 minutes, following cookbook instructions, to have Delphi running against my Informix database with a nice grid-form table and a navigation bar that works. Doesn't look much harder to do a master-detail form. OTOH, I've spent many, many hours reading the NewEra docs, looking for useage information as opposed to the theory, and found precious little and that wrong. As for learning how it works under the covers, the whole point of OO programming is to allow people to use objects & methods without *having* to know how it works. If I need to know this level of detail, I might as well write my own methods in the first place and save myself a lot of aggravation. I expect the provided methods to work without needing to know how they work. Currently, I think Informix has taken the best of the database 4GL's and created a brand new, OO 3GL from it. I don't like to say this, as I hope that I'm wrong, but the leverage that this toolset currently offers is just inferior to the opposition. Peter Wiley