[Gambas-user] Problems in the database component design

Benoit Minisini gambas at ...1...
Sun Aug 19 00:17:43 CEST 2007


On samedi 18 août 2007, Rob wrote:
> On Saturday 18 August 2007, Benoit Minisini wrote:
> > So I think I will switch to a case sensitive design. It will make
> > things harder for old VB newbies, but a cleaner design is better.
>
> Case sensitive meaning keywords will have to be upper case?  I would
> actually have to fork gb.db for my clients if you did that.
>
> If you're talking about enforcing case sensitivity in field names, it
> would still cause problems in a lot of existing code written by ex-VB
> users, but maybe I'd just never update those projects to gambas2.  I
> don't think that's what you're talking about, though, since you
> mention problems with creating tables.
>
> Any way you look at it, I think that imposing case sensitivity on a
> case-insensitive language like SQL would be a design flaw.  If you do
> feel you have to implement this, could you make a new property called
> something like "passthru" so we can send our unmodified queries
> through to MySQL or whatever the target database engine is?
>
> Rob
>

Only field and table names are concerned by case sensitivity, not SQL 
keywords. And only when using the database-neutral interface, not with the 
Exec() method.

Not all DBMS can be case unsensitive, so I found the workaround of always 
converting field and table names to lowercase. But this was not a good idea 
as the user didn't get what it expected.

Case unsensitivity is just a matter of quoting the field and table names when 
creating the table and accessing a result. 

All DBMS can quote their table of field names. But of course, they differ in 
the syntax! - Did I hear that SQL is a standard? :-)

Regards,

-- 
Benoit Minisini




More information about the User mailing list