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

  1. .Na "dbsettime" 
  2. .Aa
  3. .Fu
  4. Set the number of seconds that \*L will wait for a 
  5. \*S response to a SQL command.
  6. .Ih "time \*L waits for a \*S response, setting"
  7. .Sy
  8. .Sf "RETCODE dbsettime(seconds)"
  9. .Sp "int" "seconds"
  10. .Co
  11. .Bl
  12. This routine sets the length of time in seconds that \*L
  13. will wait for a \*S response during calls to 
  14. \f2dbsqlexec()\f1, \f2dbsqlok()\f1, \f2dbresults()\f1, and \f2dbnextrow()\f1.
  15. The default timeout value is 0, which represents an infinite timeout period. 
  16. .Bl
  17. \f2dbsettime()\f1 can be called at any time during the application\(embefore or 
  18. after a call to \f2dbopen()\f1.
  19. It takes effect immediately upon being called.
  20. .Bl
  21. To set a timeout value for calls to \f2dbopen()\f1, use \f2dbsetlogintime()\f1.
  22. .Bl
  23. Note that, after sending a query to \*S, \f2dbsqlexec()\f1 waits until a 
  24. response is received or until the timeout period has elapsed.
  25. To minimize the time spent in \*L waiting for a response from 
  26. \*S, an application can instead call \f2dbsqlsend()\f1 followed by
  27. \f2dbsqlok()\f1.
  28. .Bl
  29. The program can call
  30. .I "DBGETTIME()"
  31. to learn the current timeout value.
  32. .Bl
  33. A timeout generates the \*L error ``SYBETIME.''
  34. .Bz
  35. .Pa
  36. .Pi seconds
  37. The timeout value\(emthe
  38. number of seconds that \*L waits for a \*S response
  39. before timing out.
  40. A timeout value of 0 represents an infinite timeout period.
  41. .in -.375i
  42. .Re
  43. .br
  44. SUCCEED or FAIL.
  45. .Sa
  46. dberrhandle,
  47. DBGETTIME,
  48. dbsetlogintime,
  49. dbsqlexec,
  50. dbsqlok,
  51. dbsqlsend
  52.