MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sqlIfStmt.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #ifdef _WIN32
12 #include <windows.h>
13 #include <sqltypes.h>
14 #else
15 #include <sqltypes.h>
16 #endif
17 
18 #include "sqlIfError.h"
20 
21 class DtString;
22 class DtSqlConnection;
23 
24 // Once a connection is established with a database, communication with the
25 // database is typically done using SQL commands. An SQL statement object is
26 // needed to execute the commands. This class creates a such a statement
27 // object. Only once such object is needed - once created, it can used to send
28 // any number of SQL commands. The constructor must be passed a connection
29 // handle that is currently connected to a database. Although this class can be
30 // set up and used directly, its usually easier to set up a
31 // object. DtSqlIfDatabase automatically allocates a DtSqlIfStatement when it
32 // connects to a database (using its dbConnect() method).
34 {
35 public:
36  // Constructor
37  explicit DtSqlStatement( DtSqlConnection& connection);
38 
39  // Destructor
40  virtual ~DtSqlStatement();
41 
42  // execute an SQL command
43  virtual bool processCommand( const DtString& cmdStr );
44 
45  // Get the maximum allowed column width
46  virtual unsigned int getMaximumColumnWidgth();
47 
48  // Accessors / Mutators
49 
50  // returns a handle to the statement object allocated by this class
51  SQLHSTMT handle();
52 
53 protected:
54  SQLHSTMT myHandle;
56 };

Document ID: Generated on Wed Jun 5 18:45:18 EDT 2019 from SVN revision 198968
Copyright © 2019 VT MAK. All Rights Reserved (www.mak.com)