$assigrow problem
Terence J. Young, D.C.
terry.young at mail.mhcdc.org
Thu Apr 23 18:15:06 EDT 2009
Actually, in older versions, you could use the schema class and it would
create a table instance without the need for using a table class.
You also still had the ability to use the row defined methods of insert,
fetch, etc; however, you could not override them as you could in a table
class (which I believe still holds true) and you had to take the extra
step of notationally setting the session obj..
Do ivUserAccessRow.$definefromsqlclass('scUserAccess')
Do ivUserAccessRow.$sessionobject.$assign(tvSessObj) Returns
lvRtnFlag ;; point it to our V# session object, tvSessObj
..now the list defined methods will work.
For the most part, I have defined my lists and rows from schema classes
and used the sessionobject's methods for $fetch, $select, $delete, etc.
this made converting v2 type code from earilier version of omnis (Omnis
7), easier.
terry
Bastiaan Olij wrote:
> Hi Jean Mark,
>
>
>> To me, the build in table class works with any version of Studio (not
>> sure for 1.0, I've never used it)
>>
> The build in one was always there but you always had to create a table
> class and set $sqlclassname to the schema you wanted to use. What is new
> in Studio 4.x is that there is a tick box on the schema class that lets
> you define a list directly from the schema class without creating a
> table class first. Before that version of Studio,if you used a schema
> class you would get a list defined by the schema class but with no
> database methods (so no $insert, $update, etc.)
>
>> Brilliant, so simple, never thought about this but obvious when you
>> read it
>> Thank you for the tips, it is going to save me a lot of lines of code...
>>
> Mind you, the row approach is far from bad. When I have a list that I
> use for selecting the row that I want to edit, I tent to only load a few
> columns into that list to save on memory and bandwidth. Still, I would
> have an instance list variable for selection, and an instance row
> variable that has all the columns. When the user selects from the list,
> I load the full row into my row variable (using $select and $fetch), let
> the user do his/her thing, and then on save call the $insert/$update
> directly on my row variable.
>
> But when I have a list that already contains all my data and is defined
> from the table class, I just do the $insert/$update on the list
> directly. It will work on the current line of the list.
>
> Greetz,
>
> Bas
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
>
>
>
More information about the omnisdev-en
mailing list