DCL 3.7.4
Loading...
Searching...
No Matches
PeConnection.h
Go to the documentation of this file.
1#ifndef __DCL_PE_CONNECTION_H__
2#define __DCL_PE_CONNECTION_H__ 20250403
3
4__DCL_BEGIN_NAMESPACE
5
7{
9protected:
10 ByteString __connectionID;
11 ByteString __lastErrorMessage;
12
13public:
14 void setErrorHandle(
15 SQL::Error _error, long _SQLCODE,
16 const wchar_t* _filename, int _line
17 );
18
19 void setErrorMessage(
20 const ByteString& _message,
21 const wchar_t* _filename, int _line
22 );
23
24 _CONST char* connectionID() const;
25
26public:
27 // interface implementation
28 virtual void destroy();
29 PeConnection(const wchar_t* _serverTitle);
30 virtual ~PeConnection();
31 virtual bool __open(const char* _conns, size_t _connslen);
32 virtual bool __close();
33 virtual bool __execute(const char* _sql, size_t _sqllen);
34 virtual bool __startTrans();
35 virtual bool __commitTrans();
36 virtual bool __rollbackTrans();
37 virtual bool __createQueryInstance(SQL::Query** _queryHandleOut);
38 virtual bool __getErrorMessage(char* _buf, size_t* _buflen);
39 virtual bool __getServerInfo(char* _buf, size_t* _buflen);
40};
41
43 const ByteString& _message,
44 const wchar_t* _filename, int _line
45 )
46{
47 Connection::setErrorStatus(SQL::eServerError, _filename, _line);
48 __lastErrorMessage = _message;
49}
50
52{
53 return (_CONST char*)__connectionID.data();
54}
55
56__DCL_END_NAMESPACE
57
58#endif // __DCL_PE_CONNECTION_H__
#define _CONST
Definition Config.h:325
#define DECLARE_CLASSINFO(class_name)
Definition Object.h:227
virtual bool __getServerInfo(char *_buf, size_t *_buflen)
_CONST char * connectionID() const
virtual bool __getErrorMessage(char *_buf, size_t *_buflen)
virtual bool __createQueryInstance(SQL::Query **_queryHandleOut)
virtual bool __execute(const char *_sql, size_t _sqllen)
virtual bool __commitTrans()
virtual bool __startTrans()
void setErrorHandle(SQL::Error _error, long _SQLCODE, const wchar_t *_filename, int _line)
virtual ~PeConnection()
PeConnection(const wchar_t *_serverTitle)
void setErrorMessage(const ByteString &_message, const wchar_t *_filename, int _line)
virtual bool __rollbackTrans()
virtual void destroy()
virtual bool __open(const char *_conns, size_t _connslen)
virtual bool __close()
_PROTECTED const wchar_t * _filename
Definition SQLCore.h:439
_PROTECTED const wchar_t int _line
Definition SQLCore.h:441
Error
Definition SQLCore.h:19
@ eServerError
Definition SQLCore.h:21