home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / NextLibrary / Documentation / Sybase / DBLIB / Section2 / dbretstatus.nr < prev    next >
Encoding:
Text File  |  1993-04-22  |  2.1 KB  |  63 lines

  1. .Na "dbretstatus" 
  2. .mc |
  3. .Aa
  4. .Fu
  5. Determine the stored procedure status number returned by the
  6. current command or remote procedure call.
  7. .Ih "stored procedure, status number returned by"
  8. .Ih "return status, stored procedure"
  9. .Ih "status value, stored procedure"
  10. .Sy
  11. .Sf "DBINT dbretstatus(dbproc)"
  12. .Sp "DBPROCESS" "*dbproc"
  13. .Co
  14. .Bl
  15. \f2dbretstatus()\f1 fetches a stored procedure's status number.
  16. All stored procedures that are run on a \*S version 4.0 or above
  17. return a status number.
  18. Stored procedures that complete normally return a status number of 0.
  19. For a list of return status numbers, see the \f2Commands Reference\f1.
  20. .Bl
  21. The \f2dbhasretstat()\f1 routine 
  22. determines whether the current \*N command or 
  23. remote procedure call actually generated a return status number.
  24. Since status numbers are a feature of stored procedures,
  25. only a remote procedure call or an EXECUTE command can generate a status number.
  26. .Bl
  27. When executing a stored procedure,
  28. the server returns the status number immediately after returning all other results.
  29. Therefore, the application can call \f2dbretstatus()\f1 only after 
  30. processing the stored procedure's results by calling 
  31. \f2dbresults()\f1, as well as \f2dbnextrow()\f1 if appropriate.
  32. (Note that a stored procedure can generate several sets of results\(emone for each SELECT
  33. it contains.
  34. Before the application can call \f2dbretstatus()\f1 or \f2dbhasretstat()\f1, it
  35. must call \f2dbresults()\f1 and \f2dbnextrow()\f1 as many times as necessary
  36. to process all the results.)
  37. .Bl
  38. The order in which the application processes the status number and any return
  39. parameter values is unimportant.
  40. .Bl
  41. For an example of this routine,
  42. see Example 8 in the \f2\*L Reference Supplement\f1.
  43. .Bz
  44. .Pa
  45. .Pi dbproc
  46. A pointer to the DBPROCESS structure that provides the connection
  47. for a particular front-end/\*S process.  It contains all the
  48. information that \*L uses to manage communications and data between the
  49. front end and \*S.
  50. .in -.375i
  51. .Re
  52. .br
  53. The return status number for the current command.
  54. .Sa
  55. dbhasretstat,
  56. dbnextrow,
  57. dbresults,
  58. dbretdata,
  59. dbrpcinit,
  60. dbrpcparam,
  61. dbrpcsend
  62. .mc
  63.