Pervasive
Sign in | Join | Help
in

Status code descriptions

Last post 05-22-2008 8:07 AM by nkhughes. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 05-19-2008 1:24 PM

    Status code descriptions

    Does anyone know if there is an API call that will return Status Code Description information?  So, if a user gets a status 84 I can call the api(84) for a description of the 84 and then display the description back to the user.

    Thanks

     

     

  • 05-19-2008 1:52 PM In reply to

    Re: Status code descriptions

    This api call does not exist. 

  • 05-19-2008 1:59 PM In reply to

    Re: Status code descriptions

    I guess you were asking if any other user has turned the error messages in a something that can be called via an api call.  

    Jose 

     

  • 05-19-2008 10:13 PM In reply to

    Re: Status code descriptions

    I feel like it makes a lot of sense for the engine to provide that information.  A simple API call could return a brief description of the status code or perhaps a summary and detail.  If it doesnt exist perhaps this would be a good suggestion for an enhancement.  We could present this information to the user when various status codes are returned rather than having to create our own database of status descriptions.

     

  • 05-20-2008 7:34 AM In reply to

    Re: Status code descriptions

    This was submitted as enhancement request 57373.

     

    Jose

  • 05-20-2008 10:00 AM In reply to

    Re: Status code descriptions

    This is an excellant idea.  In the past I've had to scrape the error codes and descriptions out of the pervasive documentation and then embed the errors into my code as a dll or shared file.  I never thought to just ask for a btrieve api call :)



     

  • 05-20-2008 10:03 AM In reply to

    Re: Status code descriptions

     I would like to suggest that the API return two different versions of the error text .. a short, one line error text, such as "Record or page is locked" and then a separate longer full error description, such as the text that appears in the Pervasive documentation.  Depending on the user interface, the programmer could select the appropriate verbosity of the error message.

  • 05-22-2008 8:07 AM In reply to

    Re: Status code descriptions

    Maybe Pervasive could supply a P.SQL database file with the necessary information. The table could contain something like:

    StatusCode - signed integer

    Status Summary - char string (255 characters max?)

    Status Description - variable length

    The developer could then work out how to extract the explanation they need, or maybe the suggested API call would access it provided the table was installed under a predefined database name that you could predict was always going to be present (like the existing DEMODATA is....usually)?

    Storing the information in a file would allow updated versions to be downloaded without the need for a service pack/update, plus the file could be used by older versions of Pervasive.SQL that have no chance of getting the new API call.

    This is something I've been thinking of creating myself, but the thought of extracting the strings from the existing online documentation has always thrown a spanner in the works. That and having to keep checking whether new information has been added.


     

Page 1 of 1 (8 items)
© 2008 Pervasive Software Inc. All Rights Reserved.