[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ResultField.Type=-2
[Thread Prev] | [Thread Next]
- Subject: Re: ResultField.Type=-2
- From: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Wed, 19 Mar 2025 23:14:26 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 19/03/2025 à 23:07, BB a écrit :
I'm sorry, I guess that I'm not making myself clear.I am getting -2 returned from ResultField.Type for a particular *postgresql* database that I am denied DML access to.I'm guessing that for one occurrence that its a ByteA (picture) column but that is not apparent in other cases (maybe they are ByteA but I cant tell).My question is not about database types, its about Gambas or more specifically the DB or DB2 components.What does Gambas mean when it returns a field type that is not one of the "standard types"? Does it mean "I don't know what this field data type is." or "This field looks like some sort of array of bytes possibly but not certainly" or "this field contains fish on bicycles" or ...?Why is it returning a negative number? Is the positive part of the number meaningful in any way i.e. it looks like your examples of other databases that it means something other than ByteA, but is that determinate? (From your replies it looks not! Could other column types also return a -2 field type?)For that matter, as far as I can see ResultField.Type is the Gambas type i.e. what type Gambas converts the database value into, not the real database type. Which is only worse.rgrds b
The datatype of a field is a constant of the 'DB' class, not the 'gb' class, even if they share common values.
'-2' is the value of 'db.Serial', which mean a serial field. Serial field are detected according of heuristics that depend on the database driver.
You can look at the Gambas source code of the drivers to check them. Regards, -- Benoît Minisini.
ResultField.Type=-2 | BB <adamnt42@xxxxxxxxx> |
Re: ResultField.Type=-2 | Ian Roper <westozscribe@xxxxxxxxx> |
Re: ResultField.Type=-2 | BB <adamnt42@xxxxxxxxx> |
Re: ResultField.Type=-2 | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |
Re: ResultField.Type=-2 | BB <adamnt42@xxxxxxxxx> |