MAK Data Logger API Documentation for DIS
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
libsrc
vlDatabase
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
"
19
#include "
databaseCommandProcessor.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).
33
class
DT_DLL_VLDB
DtSqlStatement
:
public
DtDatabaseCommandProcessor
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
;
55
DtSqlIfErrorHandler
myErrorHandler
;
56
};
Document ID: Generated on Thu Apr 11 12:13:00 EDT 2013 from SVN revision 126011
Copyright © 2005-2012 VT MÄK. All Rights Reserved (
www.mak.com
)