home *** CD-ROM | disk | FTP | other *** search
/ Datatid 1999 #6 / Datatid_1999-06.iso / internet / Tango352Promo / P.SQL / PTKPKG.1 / SQLSAM32.BAS < prev    next >
Encoding:
BASIC Source File  |  1997-04-14  |  2.7 KB  |  69 lines

  1. Attribute VB_Name = "Module1"
  2. '*************************************************************************
  3. '**
  4. '**  Copyright 1997 Pervasive Software Inc. All Rights Reserved
  5. '**
  6. '*************************************************************************
  7. '*************************************************************************
  8. '   SQLSAM32.BAS
  9. '     This module is for use with Visual Basic for MS-Windows and
  10. '     Scalable SQL.  It contains declarations used by the sample progam,
  11. '     'sqlsam32.frm'.  For more info, look in sqlsam32.frm.
  12. '
  13. '     Notice that RecLen and ID in the structure below are declared as
  14. '     strings instead of Integer and Long, respectively.  This is because we
  15. '     need to have the structure elements aligned on byte boundaries,
  16. '     the same way it is returned in Scalable SQL's data buffer.  Declaring
  17. '     strings instead of integers causes byte alignement instead of
  18. '     double-word alignment.
  19. '
  20. '     In general, there is no easy solution to the byte-alignment issue
  21. '     short of Visual Basic providing for byte-aligned structures.
  22. '
  23. '************************************************************************
  24. '*************************************************************************
  25. '    DEFINE PERSON_STRUCT STRUCTURE AND GLOBAL VARIABLE
  26. '*************************************************************************
  27. Type PERSON_STRUCT
  28.    RecLen             As String * 2    'really a short integer
  29.    ID                 As String * 4    'really a long
  30.    Dummy              As String * 4    'really a long
  31.    FirstName          As String * 16
  32.    LastName           As String * 26
  33.    PermStreet         As String * 31
  34.    PermCity           As String * 31
  35.    PermState          As String * 3
  36.    PermZip            As String * 11
  37.    PermCountry        As String * 21
  38.    Street             As String * 31
  39.    City               As String * 31
  40.    State              As String * 3
  41.    Zip                As String * 11
  42.    Phone              As String * 10
  43.    EmergencyPhone     As String * 20
  44.    Unlisted           As String * 1
  45.    DateOfBirth        As String * 4
  46.    EmailAddress       As String * 31
  47.    Sex                As String * 1
  48.    Citizenship        As String * 21
  49.    Survey             As String * 1
  50.    Smoker             As String * 1
  51.    Married            As String * 1
  52.    Children           As String * 1
  53.    Disability         As String * 1
  54.    Scholarship        As String * 1
  55.    Comments           As String * 200
  56. End Type
  57.  
  58.  
  59. '*************************************************************************
  60. '  Constants
  61. '*************************************************************************
  62. Const SUCCESS% = 0
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.