>12) I think that Gareth could have made his control database neutral. But it >is his code, so he is the boss.
Gareth subclasses standard Gambas components, so it *is* neutral. I can only think he was confused because he saw a SELECT statement and assumed this particular to MySQL (!) It is possible I've inadvertently done something Postgres can't handle, but this wasn't intentional and isn't something I'm aware of. I would love *not* to have to use "SELECT"'s in the code, however at the time of writing I was unaware of any way to achieve the same effect, although I will review this when I come back to the code ... (the SELECT's etc are pretty generic (!)) Gareth. ----- Original Message ----- From: "Benoit Minisini" <gam...@users.sourceforge.net> To: dg...@yahoo.com, "mailing list for gambas users" <gambas-user@lists.sourceforge.net> Sent: Wednesday, 14 January, 2009 1:55:36 PM GMT +00:00 GMT Britain, Ireland, Portugal Subject: Re: [Gambas-user] Gambas2 components? On mardi 13 janvier 2009, dave L wrote: > Hi Charles, > > Yes i've had a look at the code that is in the database example. > > by the time i went to be i had in my sample app created a link to the DB > from cut i cout & pasted into my app from the sample DB. > > I suppose you have modules you call in that you pass parameters to and it > passes back the connection and then other routines you call to fill you > form controls with data as shown in the sample refresh form (or whatever > it's called). > > anyways i will have another look at how the table connection is made and > recordsets are done. It's the lack of these properties for those actions i > was surprised about initially. > > ps thanks for your reply. > > dave. > Do you really look at the "Database" example? The standard database-bound controls of Gambas are located in the gb.db.form component. They are somewhat sparse, but here is a quick description: 1) A DataSource container. You specifiy your request there (usually a table), and all data controls inserted in the container will use it. 2) If you put a DataSource A inside another DataSource B, then the DataSource A is filtered by the primary key of the DataSource B. 3) You have a DataControl control, that allows to edit a field by using a control that depends on the field datatype. 4) You have a DataCombo control, that is a ComboBox that displays an integer field by using it as a primary key on another tabl. 5) You have a DataView, that allows to show the contents of a DataSource in a GridView. 6) You have a DataBrowser, that allows to browse its parent DataSource by using a DataView and some buttons. 7) There is a DataComboMulti too in Gambas 3, but I didn't write nor tested it. 8) Theses controls are database neutral. They work with mysql, postgresql, sqlite, firebird... 9) The DataSource is "intelligent". It only request the records from the database by small packets. This way, you can put Internet between your application and the database, and things are perfectly usuable. Some caveats: 10) All table must have a primary key. 11) All DataSource use the current opened connection. Having some sort of "Connection" property to have two DataSource controls on different connection is planned. 12) I think that Gareth could have made his control database neutral. But it is his code, so he is the boss. Regards, -- Benoit Minisini ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Managing Director, Encryptec Limited Tel: 0845 5082719, Mob: 0785 3305393 Email: gar...@encryptec.net Statements made are at all times subject to Encryptec's Terms and Conditions of Business, which are available upon request. ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user