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

  1. .Na "dbcancel" 
  2. .Aa
  3. .Fu
  4. Cancel the current command batch.
  5. .Ih "command batch, canceling"
  6. .Sy
  7. .Sf "RETCODE dbcancel(dbproc)"
  8. .Sp "DBPROCESS" "*dbproc"
  9. .Co
  10. .Bl
  11. This routine 
  12. cancels execution of the current command batch on \*S and flushes
  13. any pending results.
  14. The application can call it after calling
  15. .I "dbsqlexec(),"
  16. .I "dbsqlsend(),"
  17. .I "dbsqlok(),"
  18. .I "dbresults(),"
  19. or
  20. .I "dbnextrow()."
  21. \f2dbcancel()\f1 sends an attention packet to \*S, which causes
  22. \*S to cease execution of the command batch.
  23. Any pending results are read and discarded.
  24. .Bl
  25. .I "dbcancel()"
  26. cancels \f2all\f1 the commands in the current command batch.  
  27. To cancel only the results from the current command,
  28. call \f2dbcanquery()\fP instead.
  29. .Bl
  30. If you have set your own interrupt handler using
  31. .I "dbsetinterrupt()" ,
  32. you can't call
  33. .I "dbcancel()"
  34. in your interrupt handler.
  35. This would cause output from \*S to
  36. \*L to become out of sync.
  37. If you want to cancel the current command batch from your interrupt handler,
  38. the interrupt handler should set a flag that you can check before
  39. the next call to 
  40. .I "dbresults()"
  41. or 
  42. .I "dbnextrow()."
  43. .Bl
  44. An asynchronous version of \f2dbcancel()\f1, called \f2dbcancel_a()\f1, is available for VMS.
  45. .Bz
  46. .Pa
  47. .Pi dbproc
  48. A pointer to the DBPROCESS structure that provides the connection
  49. for a particular front-end/\*S process.  It contains all the
  50. information that \*L uses to manage communications and data between the
  51. front end and \*S.
  52. .in -.375i
  53. .Re
  54. .br
  55. SUCCEED or FAIL.
  56. The most common reasons for failure are a dead DBPROCESS or a network error.
  57. .Sa
  58. dbcancel_a,
  59. dbcanquery,
  60. dbnextrow,
  61. dbresults,
  62. dbsetinterrupt,
  63. dbsqlexec,
  64. dbsqlok,
  65. dbsqlsend
  66.