[Gambas-user] In search of two features
Stephen Bungay
sbungay at ...981...
Sat Mar 8 05:11:17 CET 2008
Why not use a grid instead?
I did a Point Of Sale (POS) for someone a year ago. The application
used a grid to track all items purchased. The grid was populated from a
table lookup after scanning in the UPC code, or, if the bar code would
not scan the number could be entered in by hand.
Pushing the contents of a grid to a table is also a simple process
since the grid mimics a result-set fairly closely, and you have the
added benefit of being able to store row keys in a hidden column.
Perhaps all of the above would not suit your application and I
mis-understood what you're doing, in which case just ignore my ramblings.
Steve.
Kari Laine wrote:
> second, some kind of indexing for text boxes. I am making a billing
> program and I have form with the following layout.
>
> Product Amount
>
> Tomatoes____________________________ ___7.30
> Apples______________________________ ___5.30
>
>
> There are 40 rows with textboxes. Let's call them product1 - product40
> and amount1 - amount40.
>
> How now store these products to a database where each row is one record.
> I would like to use somekind of loop, like
>
> db.open
> rs = db.create("rows")
> for counter = 1 to 40
>
> if not empty mform.product[counter] then
> rs!product = mform.product[counter]
> endif
> if not empty mform.amount[counter] then
> rs!amount = mform.amount[counter]
> endif
>
> rs.update
>
> next
>
> Naturally same problem is to get information from the database back to form.
>
> Hopefully my explanation is understood.
>
> Best Regards
> Kari
>
>
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> 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