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

  1. .Na "dbgetuserdata" 
  2. .mc |
  3. .Aa
  4. .Fu
  5. Return a pointer to user-allocated data from a DBPROCESS structure.
  6. .Ih "user data"
  7. .Ih "data, user"
  8. .Sy
  9. .Sf "BYTE *dbgetuserdata(dbproc)"
  10. .Sp "DBPROCESS" "*dbproc"
  11. .Co
  12. .Bl
  13. This routine returns, from a DBPROCESS structure, a pointer to user-allocated data.
  14. The application must have previously saved this pointer with the \f2dbsetuserdata()\f1 routine.
  15. .Bl
  16. \f2dbgetuserdata()\f1 and \f2dbsetuserdata()\f1 allow the application to associate user data
  17. with a particular DBPROCESS.
  18. This avoids the necessity of using global variables for this purpose.
  19. One use for these routines is to handle deadlock, as shown in the example on the
  20. \f2dbsetuserdata()\f1 manual page.
  21. That example reruns the transaction when the application's message handler detects deadlock.
  22. .Ih "deadlock"
  23. .Bl
  24. This routine is particularly useful when the application has multiple DBPROCESSes.
  25. .Ih "DBPROCESSes, multiple"
  26. .Bz
  27. .Pa
  28. .Pi dbproc
  29. A pointer to the DBPROCESS structure that provides the connection
  30. for a particular front-end/\*S process.  It contains all the
  31. information that \*L uses to manage communications and data between the
  32. front end and \*S.
  33. .in -.375i
  34. .Re
  35. .br
  36. A generic BYTE pointer to the user's private data space.
  37. This pointer must have been previously saved with the 
  38. \f2dbsetuserdata()\f1 routine.
  39. .Sa
  40. dbsetuserdata
  41. .mc
  42.