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-2024 MAK Technologies, Inc
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 };
Definition: databaseCommandProcessor.h:17
SQLHSTMT myHandle
Definition: sqlIfStmt.h:54
Definition: sqlIfConnection.h:35
Contains DtSqlIfErrorHandler.
Contains DtDatabaseCommandProcessor class.
Definition: sqlIfError.h:41
#define DT_DLL_VLDB
Definition: vlDatabase.h:20
DtSqlIfErrorHandler myErrorHandler
Definition: sqlIfStmt.h:55
virtual bool processCommand(const DtString &command)=0
virtual unsigned int getMaximumColumnWidgth()=0
Definition: sqlIfStmt.h:33

Document ID: Generated on Fri May 31 15:45:35 EDT 2024 from SVN revision 266500
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)