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

  1. .Na "build_xact_string" 
  2. .Aa
  3. .Fu
  4. Build a name for a distributed transaction.
  5. .Ih "distributed transaction, building a name for"
  6. .Sy
  7. .Sf "void build_xact_string(xact_name, service_name, commid, result)
  8. .Sp "char" "*xact_name"
  9. .Sp "char" "*service_name"
  10. .Sp "DBINT" "commid"
  11. .Sp "char" "*result"
  12. .Co
  13. .Bl
  14. This routine builds a name string for use 
  15. in the SQL BEGIN TRANSACTION and PREPARE TRANSACTION 
  16. of a \*S transaction. 
  17. If \*S has to recover the transaction, it uses information
  18. encoded in the name to determine which commit service to contact 
  19. and which transaction in that service to inquire about.
  20. The application should issue a SQL BEGIN TRANSACTION using
  21. the string built by \f2build_xact_string()\f1.
  22. .Bz
  23. .Pa
  24. .Pi xact_name
  25. The application or user name for the transaction. This name
  26. gets encoded in the name string but is not used
  27. by the commit service or \*S. It serves to identify the transaction
  28. for debugging purposes.
  29. .Pi service_name
  30. The name that will be used by \*S to contact the commit
  31. service, should it be necessary to recover the transaction.
  32. If \f2service_name\fP is NULL, the name DSCOMMIT is used.
  33. .Pi commid
  34. The number used by the commit service to identify the transaction.
  35. \f2commid\f1 is the number returned by the call to \f2start_xact()\f1.
  36. .Pi result
  37. Address of buffer where the string should be built.
  38. The space must be allocated by the caller.
  39. .in -.375i
  40. .Re
  41. .br
  42. None.
  43. .Sa
  44. commit_xact,
  45. start_xact
  46.