[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What happened to gb.db2?
[Thread Prev] | [Thread Next]
- Subject: Re: What happened to gb.db2?
- From: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Sun, 27 Apr 2025 20:41:24 +0200
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 27/04/2025 à 16:58, Jorge Carrión a écrit :
In gb.db, resultFields is an Array[] of resultFields objects. You can obtain the name of a field with MyResult.Fields[n].Name. In gb.db2 resultFields is a collection with the Field.Name as key and the resultfield object as value. You can obtain the name of a field with MyResult.fields["name"], for example.
Result.Fields is not an array, it's a collection-like object, but it has a trick I forgotten that can use number as key, so that it acts like an array too.
In 'gb.db2', Result.Fields returns a true collection, because it was faster to do that so, and so that you can use all the Collection methods and properties for free.
To be 100% backward-compatible, I have to implement a special object that mimics both collection and array.
Anyway, note that the following code: Dim hField As ResultField For Each hkey In r.Fields $cFields.Add(hKey.Name) Next works both with 'gb.db' and 'gb.db2'. Regards, -- Benoît Minisini.
Re: What happened to gb.db2? | Jorge Carrión <shordi@xxxxxxxxx> |
What happened to gb.db2? | Jorge Carrión <shordi@xxxxxxxxx> |
Re: What happened to gb.db2? | Christof Thalhofer <chrisml@xxxxxxxxxxx> |
Re: What happened to gb.db2? | Jorge Carrión <shordi@xxxxxxxxx> |