home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a063 / 6.img / SAMPLE / APTFORMS / GTHDR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-08-24  |  667 b   |  33 lines

  1. #include <sybfront.h>
  2. #include <sybdb.h>
  3. #include <sybfrs.h>
  4.  
  5. #if MSDOS
  6. #    include    "aforms.h"
  7. #endif /* MSDOS */
  8.  
  9. /*
  10. **    GTHDR - Set up Sales Entry form header information.
  11. **
  12. **    Get the current date and operator's login from the SQL Server.
  13. **    This is triggered by the Sales Entry form pre-processing.
  14. */
  15.  
  16. gthdr(context, argarray)   
  17. FRSCONTEXT  *context;
  18. POINTER  argarray[];
  19. {
  20.  
  21.     DBPROCESS        *dbproc;
  22.  
  23.     dbproc = (DBPROCESS *)argarray[0];
  24.  
  25.     /* Put commands into command buffer. */
  26.     if (fssql(dbproc, "select date = getdate(), login = user_name()") != 1)
  27.     {
  28.         fsabort("Attempt to read date and login failed(fssql)");
  29.     }
  30.  
  31.     return;
  32. }
  33.