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

  1. .Na "dbreadpage" 
  2. .Aa
  3. .Fu
  4. Read a page of binary data from \*S.
  5. .Ih "binary data, reading a page of"
  6. .Ih "database pages, examining"
  7. .Sy
  8. .Sf "DBINT dbreadpage(dbproc, dbname, pageno, buf)"
  9. .Sp "DBPROCESS" "*dbproc"
  10. .Sp "char" "*dbname"
  11. .Sp "DBINT" "pageno"
  12. .Sp "BYTE" "buf[]"
  13. .Co
  14. .Bl
  15. .I "dbreadpage()"
  16. reads a page of binary data from \*S. This routine is primarily
  17. useful for examining and repairing damaged database pages.
  18. After calling
  19. \f2dbreadpage()\fP, the DBPROCESS may contain some error or informational
  20. messages from \*S. These messages may be accessed through a user-supplied
  21. message handler.
  22. .Ns W
  23. Use this routine only if you are absolutely sure you know what you are doing!
  24. .Ne
  25. .Bz
  26. .Pa
  27. .Pi dbproc
  28. A pointer to the DBPROCESS structure that provides the connection
  29. for a particular front-end/\*S process.  It contains all the
  30. information that \*L uses to manage communications and data between the
  31. front end and \*S.
  32. .Pi dbname
  33. The name of the database of interest.
  34. .Pi pageno
  35. The number of the database page to be read.
  36. .Pi buf
  37. A pointer to a buffer to hold the received page data. \*S pages
  38. are currently 2048 bytes long.
  39. .in -.375i
  40. .Re
  41. .br
  42. The number of bytes read from \*S. If the operation was
  43. unsuccessful, \f2dbreadpage\fP returns -1.
  44. .Bg
  45. .br
  46. Alters the contents of the DBPROCESS command buffer.
  47. .Sa
  48. dbmsghandle,
  49. dbwritepage
  50.