Welcome, Guest
Username: Password: Remember me
This forum is the place to discuss issues related to ReportPro, Xs2Ado, Vo2Ado, bBrowser and other 3rd party products
  • Page:
  • 1

TOPIC:

Xs2Ado AdoRecordSet:FieldGet() returns -1 for DbNull 28 Sep 2021 08:42 #19734

  • elibrighton
  • elibrighton's Avatar
  • Topic Author


  • Posts: 6
  • Hi,
    I'm using version 5.0.4.0 of Xs2Ado in an XSharp project using the Vulcan dialect. I've noticed that the AdoRecordSet:FieldGet() method returns a -1 (Long) value for DbNull values when the AdoCommand:CommandType is set to adCmdStoredProc. Hopefully my use of DbNull is correct here.
    LOCAL oCommand AS AdoCommand
    LOCAL oRs AS AdoRecordSet
    ...
    oCommand := AdoCommand{}
    oCommand:CommandType := adCmdStoredProc
    ...
    oRs := oCommand:Execute(NIL, System.Reflection.Missing.Value, NIL)
    uSomeVar := oRs:FIELDGET(#SomeColumn)
    
    // uSomeVar is -1 (Long) when the column value is a DbNull

    However, this same code returned a NULL (NIL) for Text columns and a 0 for Int columns with DbNull values when using Vulcan.NET.

    Could you please help me understand if this is the expected behaviour in Xs2Ado for the ADORecordSet class?

    Please Log in or Create an account to join the conversation.

    Last edit: by elibrighton.
    • Page:
    • 1