HI Mark,

my understanding of SQL (and that may be wrong or limited to certain
versions) is that case sensitivity is a matter of how your database (or
perhaps even table) is set up.

On the other hand, ooRexx directory indexes are case sensitive when quoted,
so assuming your recordset gets the column names back from the db they will
be upper or lower or mixed case (I think that exhausts the possibilities),
and if you want to retrieve that index from the recordset then you need to
know whether the field is named 'lastname' or 'LASTNAME' or 'lastName'.  If
you force the names into upper or lower case then your user does not need
to remember this, and if he is a bit inconsistent in his casing like me
then he will appreciate not receiving the nil object just because he asked
for 'lastName' and the column is named 'LASTNAME'.

I think your aproach of letting the user chose the delivery method for the
recordset is very good.  As soon as I saw Dan's email, I thought 'Oh yes,
the classic Rexx coders will want their data returned in a stem variable'.

You might take a look at the approach used by Mark Hessling in rexxsql
where he returns both single rows, multiple rows and database information
in stems.

For myself, having used arrays, sets tables etc. for 10 years I would hate
to go back to stem variables.

I really want to echo what Dan said about appreciating the work you are
doing.
A close coupling with an rdbms is so clearly something that will add to the
attractiveness of the product.

 Jon

On 5 June 2012 16:18, Mark Miesfeld <[email protected]> wrote:

> Hi Jon,
>
> I pulled this out of the other post because the chain of e-mails was
> getting to long for me.
>
> On Sun, Jun 3, 2012 at 2:33 PM, Sahananda (Jon) Wolfers
> <[email protected]> wrote:
>
> > thanks for the reply.  It all sounds reasonable, although if I were to
> use
> ...
>
> > then you have to work really hard to fetch each field from the row.  It
> > feels a whole lot more rexxish to me to be able to say
> >
> > osql~exec(myQuery)
> >
> > do row over osql~rows
> >    if row['name'] = 'Smith' then do ... end
> > end
> >
> > I even modify the directories like so:
> > .directory~new~~setmethod('UNKNOWN',"if self~hasIndex(lower(arg(1))) then
> > return self[lower(arg(1))] ; else return .nil")
> > And then force the field names to lower case so that one doesn't have to
> > know the case of the field names to use them.
>
> I don't know SQL well, or have much experience using it, but it was my
> understanding that column names in SQL were case insensitive.   These
> selects all seem to work the same for me in a test database I have:
>
> select SEASON from episodes;
> select Season from episodes;
> select season from episodes;
>
> When creating a directory object in the native implementation code, I
> always use an upper-case index.  Your example above would work as
> this:
>
> osql~exec(myQuery)
>
> do row over osql~rows
>   if row~name = 'Smith' then do ... end
> end
>
> in ooSQLite when a result set is returned as an array of directories.
> Or am I missing something on case sensitivity with column names?
>
> > Anyway, I offer this because you sounded like you wanted to hear from
> > someone who used a rdbms from rexx and I do a lot.
>
> This is true in any of these discussions.  My experience with SQL and
> actually using a rdbms is very limited.  And I'm not a "rexxish"
> programmer.  I'm a C programmer used to writing code that runs in
> kernel space, not user space.  ;-)
>
> --
> Mark Miesfeld
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to