[Gambas-user] value of a field

Jean-Yves F. Barbier 12ukwn at ...626...
Tue Jul 21 04:59:36 CEST 2009


Hi,

I don't know how to recover the value from my field in:

EXPORT
CREATE STATIC

' "GLOBAL" VARIABLES
STATIC PUBLIC $dbConnection AS NEW Connection
       STATIC PUBLIC dbLogin AS String
STATIC PUBLIC dbLoginOid AS Integer

PRIVATE SUB getAdminOid()
  DIM resQuery AS Result
  DIM refiField AS ResultField

    resQuery = $dbConnection.Exec("SELECT usesysid FROM pg_user WHERE usename =
'" & dbLogin & "';")
    FOR EACH refiField IN resQuery.Fields
      ' Ok: refiField.Name = 'usesysid', I'm happy, but I would be happier with
its value
      dbLoginOid = refiField.Result
    NEXT
    PRINT "OID de boss = " & dbLoginOid


  END WITH
  'CATCH
  '  Message.Warning("Procédure 'getAdminOid'")
END

Even if I cast it to integer, I still have and error.

-- 
The only way to get rid of a temptation is to yield to it.
		-- Oscar Wilde




More information about the User mailing list