home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / dbmsg / odbc / admndemo / info.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-10-06  |  6.8 KB  |  166 lines

  1. //*---------------------------------------------------------------------------------
  2. //|  ODBC System Administrator
  3. //|
  4. //|  This code is furnished on an as-is basis as part of the ODBC SDK and is
  5. //|  intended for example purposes only.
  6. //|
  7. //|   Title:   INFO.H
  8. //|      This file contains the prototypes and defines for executing SQL
  9. //|         statements and displaying their results.
  10. //*---------------------------------------------------------------------------------
  11. #ifndef info_DEFS
  12. #define info_DEFS
  13.  
  14. #include <windows.h>
  15. #include "standard.h"
  16. #include "errcheck.h"
  17. #include "ctl3d.h"
  18. #include "results.h"
  19. #include "child.h"
  20. #include "execute.h"
  21. #include "stdlib.h"
  22.  
  23.  
  24. //*---------------------------------------------------------------------------------
  25. //|   Macros and Defines
  26. //*---------------------------------------------------------------------------------
  27. #define  MAX_QUALIFIER     45
  28. #define  MAX_OWNER         40
  29. #define  MAX_NAME          40
  30. #define  MAX_TYPE          40
  31. #define  MAX_SPEC_VAL      128
  32.  
  33. #define LIST_ALL        0
  34. #define LIST_TABLES     1
  35. #define LIST_VIEWS      2        
  36. #define  USER_SETCHECKSTATE         WM_USER + 1
  37. #define  USER_SETBUTTONSTATE        WM_USER + 2
  38. #define  USER_RESETLIST             WM_USER + 3
  39. #define  USER_SETSTATES             WM_USER + 4
  40. #define  USER_SETDEFAULTS           WM_USER + 5
  41.  
  42. #define  IDE_QUALIFIER     151
  43. #define  IDE_OWNER         153
  44. #define  IDE_NAME          155
  45. #define  IDL_LIST          157
  46. #define  IDX_ALL           158
  47. #define  IDX_TABLES        159
  48. #define  IDX_VIEWS         160
  49. #define  IDL_PIPES         162
  50. #define  LIST_WIDTH        184
  51.  
  52.  
  53. #define SQL_FN_IDS_BASE 100
  54.  
  55. #define idsSQLAllocConnect      SQL_FN_IDS_BASE+1
  56. #define idsSQLAllocEnv          SQL_FN_IDS_BASE+2
  57. #define idsSQLAllocHandle       SQL_FN_IDS_BASE+3
  58. #define idsSQLAllocStmt         SQL_FN_IDS_BASE+4
  59. #define idsSQLBindCol           SQL_FN_IDS_BASE+5
  60. #define idsSQLBindParam         SQL_FN_IDS_BASE+6
  61. #define idsSQLBindParameter     SQL_FN_IDS_BASE+7
  62. #define idsSQLBrowseConnect     SQL_FN_IDS_BASE+8
  63. #define idsSQLBulkOperations    SQL_FN_IDS_BASE+9
  64. #define idsSQLCancel            SQL_FN_IDS_BASE+10
  65. #define idsSQLCloseCursor       SQL_FN_IDS_BASE+11
  66. #define idsSQLColAttribute      SQL_FN_IDS_BASE+12
  67. #define idsSQLColAttributes     SQL_FN_IDS_BASE+13
  68. #define idsSQLColumnPrivileges  SQL_FN_IDS_BASE+14
  69. #define idsSQLColumns           SQL_FN_IDS_BASE+15
  70. #define idsSQLConnect           SQL_FN_IDS_BASE+16
  71. #define idsSQLCopyDesc          SQL_FN_IDS_BASE+17
  72. #define idsSQLDataSources       SQL_FN_IDS_BASE+18
  73. #define idsSQLDescribeCol       SQL_FN_IDS_BASE+19
  74. #define idsSQLDescribeParam     SQL_FN_IDS_BASE+20
  75. #define idsSQLDisconnect        SQL_FN_IDS_BASE+21
  76. #define idsSQLDriverConnect     SQL_FN_IDS_BASE+22
  77. #define idsSQLEndTran           SQL_FN_IDS_BASE+23
  78. #define idsSQLError             SQL_FN_IDS_BASE+24
  79. #define idsSQLExecDirect        SQL_FN_IDS_BASE+25
  80. #define idsSQLExecute           SQL_FN_IDS_BASE+26
  81. #define idsSQLExtendedFetch     SQL_FN_IDS_BASE+27
  82. #define idsSQLFetch             SQL_FN_IDS_BASE+28
  83. #define idsSQLFetchScroll       SQL_FN_IDS_BASE+29
  84. #define idsSQLForeignKeys       SQL_FN_IDS_BASE+30
  85. #define idsSQLFreeConnect       SQL_FN_IDS_BASE+31
  86. #define idsSQLFreeEnv           SQL_FN_IDS_BASE+32
  87. #define idsSQLFreeHandle        SQL_FN_IDS_BASE+33
  88. #define idsSQLFreeStmt          SQL_FN_IDS_BASE+34
  89. #define idsSQLGetConnectAttr    SQL_FN_IDS_BASE+35
  90. #define idsSQLGetConnectOption  SQL_FN_IDS_BASE+36
  91. #define idsSQLGetCursorName     SQL_FN_IDS_BASE+37
  92. #define idsSQLGetData           SQL_FN_IDS_BASE+38
  93. #define idsSQLGetDescField      SQL_FN_IDS_BASE+39
  94. #define idsSQLGetDescRec        SQL_FN_IDS_BASE+40
  95. #define idsSQLGetDiagField      SQL_FN_IDS_BASE+41
  96. #define idsSQLGetDiagRec        SQL_FN_IDS_BASE+42
  97. #define idsSQLGetEnvAttr        SQL_FN_IDS_BASE+43
  98. #define idsSQLGetFunctions      SQL_FN_IDS_BASE+44
  99. #define idsSQLGetInfo           SQL_FN_IDS_BASE+45
  100. #define idsSQLGetStmtAttr       SQL_FN_IDS_BASE+46
  101. #define idsSQLGetStmtOption     SQL_FN_IDS_BASE+47
  102. #define idsSQLGetTypeInfo       SQL_FN_IDS_BASE+48
  103. #define idsSQLMoreResults       SQL_FN_IDS_BASE+49
  104. #define idsSQLNativeSQL         SQL_FN_IDS_BASE+50
  105. #define idsSQLNumParams         SQL_FN_IDS_BASE+51
  106. #define idsSQLNumResultCols     SQL_FN_IDS_BASE+52
  107. #define idsSQLParamOptions      SQL_FN_IDS_BASE+53
  108. #define idsSQLPrepare           SQL_FN_IDS_BASE+54
  109. #define idsSQLPrimaryKeys       SQL_FN_IDS_BASE+55
  110. #define idsSQLProcedureColumns  SQL_FN_IDS_BASE+56
  111. #define idsSQLProcedures        SQL_FN_IDS_BASE+57
  112. #define idsSQLPutData           SQL_FN_IDS_BASE+58
  113. #define idsSQLRowCount          SQL_FN_IDS_BASE+59
  114. #define idsSQLSetConnectAttr    SQL_FN_IDS_BASE+60
  115. #define idsSQLSetConnectOption  SQL_FN_IDS_BASE+61
  116. #define idsSQLSetCursorName     SQL_FN_IDS_BASE+62
  117. #define idsSQLSetDescField      SQL_FN_IDS_BASE+63
  118. #define idsSQLSetDescRec        SQL_FN_IDS_BASE+64
  119. #define idsSQLSetEnvAttr        SQL_FN_IDS_BASE+65
  120. #define idsSQLSetParam          SQL_FN_IDS_BASE+66
  121. #define idsSQLSetPos            SQL_FN_IDS_BASE+67
  122. #define idsSQLSetScrollOptions  SQL_FN_IDS_BASE+68
  123. #define idsSQLSetStmtAttr       SQL_FN_IDS_BASE+69
  124. #define idsSQLSetStmtOption     SQL_FN_IDS_BASE+70
  125. #define idsSQLSpecialColumns    SQL_FN_IDS_BASE+71
  126. #define idsSQLStatistics        SQL_FN_IDS_BASE+72
  127. #define idsSQLTablePrivileges   SQL_FN_IDS_BASE+73
  128. #define idsSQLTables            SQL_FN_IDS_BASE+74
  129. #define idsSQLTransact          SQL_FN_IDS_BASE+75
  130.  
  131.  
  132.  
  133. #define IDD_EDIT_PIPE                             700
  134. #define IDC_NAME                                  701
  135. #define IDB_NEW                                   702
  136. #define IDB_DELETE                                703
  137. #define IDE_SQL                                   704
  138. #define IDR_VALUE                                 705
  139. #define IDR_ADDRESS                               706
  140. #define IDE_PARMS                                 707
  141. #define IDX_DELETE                                708
  142.  
  143. #define IDD_NEW_PIPE                              730
  144. #define IDD_DO_PIPE                               750
  145.  
  146.  
  147. //*---------------------------------------------------------------------------------
  148. //|   Global variables
  149. //*---------------------------------------------------------------------------------
  150. extern dCSEG(char) szResultsClass[];
  151. extern dCSEG(char) szODBCFunctions[];
  152.  
  153. //*---------------------------------------------------------------------------------
  154. //|   Function prototypes
  155. //*---------------------------------------------------------------------------------
  156. void EditPipe(CHILDINFO FAR * ci);
  157. BOOL DisplayGetInfo(CHILDINFO FAR * ci);
  158. BOOL DisplayODBCFunctions(CHILDINFO FAR * ci);
  159. BOOL DisplayODBCDataSources(CHILDINFO FAR * ci);
  160. BOOL DisplayODBCDataTypes(CHILDINFO FAR * ci);
  161. void INTFUN HandlePipe(lpCHILDINFO lpci, lpRESULTSINFO lpri);
  162.  
  163.  
  164.  
  165. #endif
  166.