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

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