[Gambas-user] RE: Database Field Names

Timothy Marshal-Nichols timothy.marshal-nichols at ...247...
Wed Apr 19 09:55:17 CEST 2006


Thanks. I was a bit annoyed when I sent that email. I have charmed down now.

First thoughts. How about:

1.	Send the field name to the database in the case entered by the user.
2.	Before the field name is sent to the database check the name is unique in
the table with a case insensitive test. Do not allow field names that fail
the case insensitive test.

Thanks

8-{)} Timothy Marshal-Nichols
<mailto: timothy.marshal-nichols at ...247...>


-----Original Message-----
From: gambas-user-admin at lists.sourceforge.net
[mailto:gambas-user-admin at lists.sourceforge.net]On Behalf Of ron
Sent: Wednesday, 19 April 2006 01:03
To: gambas-user at lists.sourceforge.net
Subject: Re: [Gambas-user] RE: Database Field Names


On Tuesday 18 April 2006 22:09, Benoit Minisini wrote:
> On Tuesday 18 April 2006 21:26, Timothy Marshal-Nichols wrote:
> > I am using the Gambas database objects to create a database.
> >
> > Why on earth does Gambas always convert field names into lower case. You
> > enter a field name of 'CreateDate' and Gambas always converts it to
> > 'createdate'. I find this really annoying. It does not do this to table
> > names or database names or the primary key field name!!! Why the hell
does
> > it mess up my field names. It's just plain stupid.
> >
> >
> > Thanks
> >
> > 8-{)} Timothy Marshal-Nichols
> > <mailto: timothy.marshal-nichols at ...247...>
> >
>
> Because some database systems have case sensitive field names, and some
others
> are not. The aim was to have the same code run whatever the database
backend
> is.
>
> The solution I used was always converting field names to lowercase. If you
> have a better solution...
>
> Note that I find that annoying too. :-)
>
> Regards,
>

Let the names as the user it enters.
It is his fault if the backend does not now the name in the case he ask.

If some systems are case sensitive and are created with mixed case field
names and gambas converting to lower case the user is in trouble now.

He enters as field name 'CreateDate' as in the databse definied.
gambas send 'createdate' and the backend don't understand it.

It is the users requirement to enter the correct names or he has troubles.
By auto changing to lowercase gambas is giving him the troubles.


My 2 cents :)

Ron


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user






More information about the User mailing list