transactd 2.4.3 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/RELEASE_NOTE-JA.md +21 -0
- data/RELEASE_NOTE.md +22 -0
- data/bin/common/tdclc_32_2_4.dll +0 -0
- data/bin/common/tdclc_64_2_4.dll +0 -0
- data/build/swig/ruby/tdclrb_wrap.cpp +1225 -1848
- data/build/swig/tdcl.i +77 -13
- data/build/tdclc/tdclc.rc +4 -4
- data/build/tdclcpp/tdclcpp.rc +4 -4
- data/build/tdclrb/tdclrb.rc +4 -4
- data/source/bzs/db/protocol/tdap/client/connectionPool.cpp +11 -14
- data/source/bzs/db/protocol/tdap/client/connectionPool.h +1 -6
- data/source/bzs/db/protocol/tdap/client/dbDef.h +5 -0
- data/source/bzs/db/protocol/tdap/client/dllmain.cpp +5 -10
- data/source/bzs/db/protocol/tdap/client/nsDatabase.cpp +6 -5
- data/source/bzs/db/protocol/tdap/client/nsDatabase.h +7 -2
- data/source/bzs/db/protocol/tdap/client/nsTable.cpp +5 -5
- data/source/bzs/db/protocol/tdap/client/nsTable.h +6 -1
- data/source/bzs/db/protocol/tdap/client/trnsctcl.def +1 -1
- data/source/bzs/db/protocol/tdap/mysql/request.h +7 -2
- data/source/bzs/db/protocol/tdap/tdapSchema.cpp +2 -3
- data/source/bzs/db/protocol/tdap/tdapcapi.h +4 -4
- data/source/bzs/netsvc/client/tcpClient.h +24 -10
- data/source/bzs/test/tdclphp/transactd_Test.php +34 -0
- data/source/bzs/test/tdclphp/transactd_pool_Test.php +0 -6
- data/source/bzs/test/tdclrb/transactd_spec.rb +34 -0
- data/source/bzs/test/trdclengn/test_trdclengn.cpp +4 -1
- data/source/global/tdclatl/Database.cpp +29 -7
- data/source/global/tdclatl/Database.h +6 -0
- data/source/global/tdclatl/DbDef.cpp +49 -45
- data/source/global/tdclatl/DbDef.h +1 -0
- data/source/global/tdclatl/FieldDef.cpp +14 -0
- data/source/global/tdclatl/FieldDef.h +4 -0
- data/source/global/tdclatl/FieldDefs.cpp +14 -0
- data/source/global/tdclatl/FieldDefs.h +4 -0
- data/source/global/tdclatl/GroupQuery.cpp +15 -0
- data/source/global/tdclatl/GroupQuery.h +4 -0
- data/source/global/tdclatl/KeyDef.cpp +1 -1
- data/source/global/tdclatl/KeyDef.h +1 -1
- data/source/global/tdclatl/PooledDbManager.cpp +15 -0
- data/source/global/tdclatl/PooledDbManager.h +4 -0
- data/source/global/tdclatl/PreparedQuery.cpp +15 -0
- data/source/global/tdclatl/PreparedQuery.h +4 -0
- data/source/global/tdclatl/QueryBase.cpp +15 -0
- data/source/global/tdclatl/QueryBase.h +4 -0
- data/source/global/tdclatl/Record.cpp +30 -0
- data/source/global/tdclatl/Record.h +8 -0
- data/source/global/tdclatl/Recordset.cpp +18 -3
- data/source/global/tdclatl/Recordset.h +5 -1
- data/source/global/tdclatl/RecordsetQuery.cpp +15 -1
- data/source/global/tdclatl/RecordsetQuery.h +5 -1
- data/source/global/tdclatl/Table.cpp +29 -3
- data/source/global/tdclatl/Table.h +5 -0
- data/source/global/tdclatl/TableDef.cpp +15 -0
- data/source/global/tdclatl/TableDef.h +4 -0
- data/source/global/tdclatl/activeTable.cpp +15 -0
- data/source/global/tdclatl/activeTable.h +4 -0
- data/source/global/tdclatl/tdclatl.idl +16 -10
- metadata +2 -2
@@ -207,6 +207,8 @@ class transactdTest extends PHPUnit_Framework_TestCase
|
|
207
207
|
$fd->len = 33;
|
208
208
|
$dbdef->updateTableDef($tableid);
|
209
209
|
$this->assertEquals($dbdef->stat(), 0);
|
210
|
+
//test statMsg
|
211
|
+
$this->assertEquals($dbdef->statMsg(), '');
|
210
212
|
|
211
213
|
$kd = $dbdef->insertKey($tableid, 0);
|
212
214
|
$kd->segment(0)->fieldNum = 0;
|
@@ -217,12 +219,19 @@ class transactdTest extends PHPUnit_Framework_TestCase
|
|
217
219
|
$dbdef->updateTableDef($tableid);
|
218
220
|
$this->assertEquals($dbdef->stat(), 0);
|
219
221
|
$this->assertEquals($dbdef->validateTableDef($tableid), 0);
|
222
|
+
|
223
|
+
//test toChar
|
224
|
+
$s = $td->toChar('abcdefg');
|
225
|
+
$this->assertEquals($s, 'abcdefg');
|
226
|
+
|
220
227
|
}
|
221
228
|
private function openTable($db)
|
222
229
|
{
|
223
230
|
$this->openDatabase($db);
|
224
231
|
$tb = $db->openTable(TABLENAME);
|
225
232
|
$this->assertEquals($db->stat(), 0);
|
233
|
+
//test statMsg
|
234
|
+
$this->assertEquals($db->statMsg(), '');
|
226
235
|
return $tb;
|
227
236
|
}
|
228
237
|
|
@@ -328,6 +337,28 @@ class transactdTest extends PHPUnit_Framework_TestCase
|
|
328
337
|
$this->assertEquals($engine_ver->minorVersion, Bz\transactd::TRANSACTD_VER_MINOR);
|
329
338
|
$this->assertEquals(chr($engine_ver->type), 'T');
|
330
339
|
}
|
340
|
+
public function testReadDatabaseDirectory()
|
341
|
+
{
|
342
|
+
$db = new Bz\database();
|
343
|
+
$tb = $this->openTable($db);
|
344
|
+
$this->assertNotEquals($tb, NULL);
|
345
|
+
$s = $db->readDatabaseDirectory();
|
346
|
+
$this->assertNotEquals($s, '');
|
347
|
+
}
|
348
|
+
public function testGetFileName()
|
349
|
+
{
|
350
|
+
$s = '';
|
351
|
+
if (PHP_OS == 'WIN32' || PHP_OS == 'WINNT')
|
352
|
+
$s = Bz\nstable::getFileName('test\abcdefghijklnmopqrstuvwxyz1234567890.txt');
|
353
|
+
else
|
354
|
+
$s = Bz\nstable::getFileName('test/abcdefghijklnmopqrstuvwxyz1234567890.txt');
|
355
|
+
$this->assertEquals($s, 'abcdefghijklnmopqrstuvwxyz1234567890.txt');
|
356
|
+
}
|
357
|
+
public function testGetDirURI()
|
358
|
+
{
|
359
|
+
$s = Bz\nstable::getDirURI('tdap://localhost/test?dbfile=test.bdf');
|
360
|
+
$this->assertEquals($s, 'tdap://localhost/test?dbfile=');
|
361
|
+
}
|
331
362
|
public function testInsert()
|
332
363
|
{
|
333
364
|
$db = new Bz\database();
|
@@ -339,6 +370,9 @@ class transactdTest extends PHPUnit_Framework_TestCase
|
|
339
370
|
$tb->setFV(FDI_NAME, 'kosaka');
|
340
371
|
$tb->insert();
|
341
372
|
$this->assertEquals($tb->stat(), 0);
|
373
|
+
//test statMsg
|
374
|
+
$this->assertEquals($tb->statMsg(), '');
|
375
|
+
|
342
376
|
$db->beginTrn();
|
343
377
|
$n = 1;
|
344
378
|
$tb->seekLast();
|
@@ -85,6 +85,10 @@ end
|
|
85
85
|
def testOpenDatabase(db)
|
86
86
|
db.open(URL, Transactd::TYPE_SCHEMA_BDF, Transactd::TD_OPEN_NORMAL)
|
87
87
|
expect(db.stat()).to eq 0
|
88
|
+
# test statMsg
|
89
|
+
msg = db.statMsg()
|
90
|
+
expect(msg).to eq ''
|
91
|
+
|
88
92
|
end
|
89
93
|
|
90
94
|
def testCreateTable(db)
|
@@ -168,6 +172,10 @@ def testCreateTable(db)
|
|
168
172
|
dbdef.updateTableDef(table_id)
|
169
173
|
expect(dbdef.stat()).to eq 0
|
170
174
|
|
175
|
+
# test statMsg
|
176
|
+
msg = dbdef.statMsg()
|
177
|
+
expect(msg).to eq ''
|
178
|
+
|
171
179
|
kd = dbdef.insertKey(table_id, 0)
|
172
180
|
kd.segment(0).fieldNum = 0
|
173
181
|
kd.segment(0).flags.bit8 = 1
|
@@ -225,6 +233,29 @@ def testVersion()
|
|
225
233
|
db.close()
|
226
234
|
end
|
227
235
|
|
236
|
+
def testReadDatabaseDirectory()
|
237
|
+
db = Transactd::Database.new()
|
238
|
+
tb = testOpenTable(db)
|
239
|
+
expect(tb).not_to be nil
|
240
|
+
s = db.readDatabaseDirectory()
|
241
|
+
expect(s).not_to eq ''
|
242
|
+
end
|
243
|
+
|
244
|
+
def testGetFileName()
|
245
|
+
s = ''
|
246
|
+
if RUBY_PLATFORM =~ /mswin(?!ce)|mingw|cygwin|bccwin/
|
247
|
+
s = Transactd::Nstable::getFileName('test\abcdefghijklnmopqrstuvwxyz1234567890.txt')
|
248
|
+
else
|
249
|
+
s = Transactd::Nstable::getFileName('test/abcdefghijklnmopqrstuvwxyz1234567890.txt')
|
250
|
+
end
|
251
|
+
expect(s).to eq 'abcdefghijklnmopqrstuvwxyz1234567890.txt'
|
252
|
+
end
|
253
|
+
|
254
|
+
def testGetDirURI()
|
255
|
+
s = Transactd::Nstable::getDirURI('tdap://localhost/test?dbfile=test.bdf')
|
256
|
+
expect(s).to eq 'tdap://localhost/test?dbfile='
|
257
|
+
end
|
258
|
+
|
228
259
|
def testInsert()
|
229
260
|
db = Transactd::Database.new()
|
230
261
|
tb = testOpenTable(db)
|
@@ -235,6 +266,9 @@ def testInsert()
|
|
235
266
|
tb.setFV(FDI_NAME, 'kosaka')
|
236
267
|
tb.insert()
|
237
268
|
expect(tb.stat()).to eq 0
|
269
|
+
# test statMsg
|
270
|
+
msg = tb.statMsg()
|
271
|
+
expect(msg).to eq ''
|
238
272
|
end
|
239
273
|
db.beginTrn()
|
240
274
|
n = 1
|
@@ -263,6 +263,9 @@ void testCreateNewDataBase(database* db)
|
|
263
263
|
TD_OPEN_NORMAL);
|
264
264
|
BOOST_CHECK_MESSAGE(0 == db->stat(),
|
265
265
|
"createNewDataBase 1 stat = " << db->stat());
|
266
|
+
_TCHAR buf[255];
|
267
|
+
db->readDatabaseDirectory(buf, 255);
|
268
|
+
BOOST_CHECK_MESSAGE(_tstring(buf) != _tstring(_T("")), "readDatabaseDirectory" << buf);
|
266
269
|
|
267
270
|
dbdef* def = db->dbDef();
|
268
271
|
if (def)
|
@@ -4808,7 +4811,7 @@ void testDbPool()
|
|
4808
4811
|
BOOST_CHECK_MESSAGE(0 == tb2->stat(), "tb2->seekFirst");
|
4809
4812
|
}
|
4810
4813
|
poolMgr.endSnapshot();
|
4811
|
-
|
4814
|
+
|
4812
4815
|
}
|
4813
4816
|
|
4814
4817
|
//--------------------------------------------------------------------------------------
|
@@ -23,6 +23,20 @@
|
|
23
23
|
#include "TdVersion.h"
|
24
24
|
|
25
25
|
using namespace bzs::db::protocol::tdap::client;
|
26
|
+
STDMETHODIMP CDatabase::InterfaceSupportsErrorInfo(REFIID riid)
|
27
|
+
{
|
28
|
+
static const IID* const arr[] =
|
29
|
+
{
|
30
|
+
&IID_IDatabase
|
31
|
+
};
|
32
|
+
|
33
|
+
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
|
34
|
+
{
|
35
|
+
if (InlineIsEqualGUID(*arr[i],riid))
|
36
|
+
return S_OK;
|
37
|
+
}
|
38
|
+
return S_FALSE;
|
39
|
+
}
|
26
40
|
|
27
41
|
STDMETHODIMP CDatabase::Open(BSTR Uri, eSchemaType SchemaType, eOpenMode Mode,
|
28
42
|
BSTR Dir, BSTR Ownername, VARIANT_BOOL* Param6)
|
@@ -59,9 +73,9 @@ STDMETHODIMP CDatabase::OpenTable(VARIANT TableID, eOpenMode Mode,
|
|
59
73
|
BSTR Uri, ITable** ret)
|
60
74
|
{
|
61
75
|
|
62
|
-
if (!m_db->dbDef())
|
63
|
-
|
64
|
-
|
76
|
+
//if (!m_db->dbDef())
|
77
|
+
// return Error("database is not opened. ", IID_IDatabase);
|
78
|
+
*ret = NULL;
|
65
79
|
table* tb = NULL;
|
66
80
|
if (TableID.vt == VT_BSTR)
|
67
81
|
tb = m_db->openTable(TableID.bstrVal, Mode, (bool)AutoCreate, OwnerName,
|
@@ -70,8 +84,9 @@ STDMETHODIMP CDatabase::OpenTable(VARIANT TableID, eOpenMode Mode,
|
|
70
84
|
tb = m_db->openTable(TableID.iVal, Mode, (bool)AutoCreate, OwnerName,
|
71
85
|
Uri);
|
72
86
|
|
73
|
-
if (
|
74
|
-
return
|
87
|
+
if (m_db->stat() != 0)
|
88
|
+
return S_OK;
|
89
|
+
//return Error("Invalid tableid", IID_IDatabase);
|
75
90
|
|
76
91
|
CComObject<CTableTd>* ptb;
|
77
92
|
CComObject<CTableTd>::CreateInstance(&ptb);
|
@@ -86,8 +101,7 @@ STDMETHODIMP CDatabase::OpenTable(VARIANT TableID, eOpenMode Mode,
|
|
86
101
|
*ret = itb;
|
87
102
|
m_IsAtatchOK = false;
|
88
103
|
}
|
89
|
-
|
90
|
-
*ret = NULL;
|
104
|
+
|
91
105
|
|
92
106
|
return S_OK;
|
93
107
|
}
|
@@ -356,6 +370,14 @@ STDMETHODIMP CDatabase::TdapErr(OLE_HANDLE hWnd, BSTR* Value)
|
|
356
370
|
return S_OK;
|
357
371
|
}
|
358
372
|
|
373
|
+
STDMETHODIMP CDatabase::StatMsg(BSTR* Value)
|
374
|
+
{
|
375
|
+
wchar_t tmp[1024] = { NULL };
|
376
|
+
m_db->statMsg(tmp);
|
377
|
+
*Value = ::SysAllocString(tmp);
|
378
|
+
return S_OK;
|
379
|
+
}
|
380
|
+
|
359
381
|
STDMETHODIMP CDatabase::Clone(IDatabase** Value)
|
360
382
|
{
|
361
383
|
CComObject<CDatabase>* ptb;
|
@@ -35,6 +35,7 @@ bool __stdcall onDeleteRecord(bzs::db::protocol::tdap::client::database* db,
|
|
35
35
|
class ATL_NO_VTABLE CDatabase
|
36
36
|
: public CComObjectRootEx<CComSingleThreadModel>,
|
37
37
|
public CComCoClass<CDatabase, &CLSID_Database>,
|
38
|
+
public ISupportErrorInfo,
|
38
39
|
public IDispatchImpl<IDatabase, &IID_IDatabase, &LIBID_transactd,
|
39
40
|
/* wMajor = */ 1, /* wMinor = */ 0>,
|
40
41
|
public IConnectionPointContainerImpl<CDatabase>,
|
@@ -61,7 +62,10 @@ public:
|
|
61
62
|
COM_INTERFACE_ENTRY(IDatabase)
|
62
63
|
COM_INTERFACE_ENTRY(IDispatch)
|
63
64
|
COM_INTERFACE_ENTRY(IConnectionPointContainer)
|
65
|
+
COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
64
66
|
END_COM_MAP()
|
67
|
+
// ISupportsErrorInfo
|
68
|
+
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
|
65
69
|
|
66
70
|
BEGIN_CONNECTION_POINT_MAP(CDatabase)
|
67
71
|
CONNECTION_POINT_ENTRY(__uuidof(_IDatabaseEvents))
|
@@ -127,6 +131,7 @@ public:
|
|
127
131
|
STDMETHOD(Rename)(BSTR oldUri, BSTR newUri);
|
128
132
|
STDMETHOD(get_Uri)(BSTR* uri);
|
129
133
|
STDMETHOD(TdapErr)(OLE_HANDLE hWnd, BSTR* Value);
|
134
|
+
STDMETHOD(StatMsg)(BSTR* Value);
|
130
135
|
STDMETHOD(Clone)(IDatabase** Value);
|
131
136
|
STDMETHOD(AssignSchemaData)(IDbDef* Src, short* Value);
|
132
137
|
STDMETHOD(Continuous)(eContinusOpr Op, VARIANT_BOOL inclideRepfile,
|
@@ -152,6 +157,7 @@ public:
|
|
152
157
|
STDMETHOD(get_MaxTables)(int* Value);
|
153
158
|
STDMETHOD(get_TrxIsolationServer)(eSrvIsorationType* Value);
|
154
159
|
STDMETHOD(get_TrxLockWaitTimeoutServer)(int* Value);
|
160
|
+
|
155
161
|
};
|
156
162
|
|
157
163
|
OBJECT_ENTRY_AUTO(__uuidof(Database), CDatabase)
|
@@ -34,22 +34,20 @@ STDMETHODIMP CDbDef::get_TableCount(short* Value)
|
|
34
34
|
|
35
35
|
STDMETHODIMP CDbDef::TableDef(short Index, ITableDef** Value)
|
36
36
|
{
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
CComObject<CTableDef>* piObj = NULL;
|
41
|
-
CComObject<CTableDef>::CreateInstance(&piObj);
|
42
|
-
if (piObj)
|
37
|
+
*Value = 0;
|
38
|
+
if (m_dbDef->tableDefs(Index))
|
43
39
|
{
|
44
|
-
piObj
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
40
|
+
CComObject<CTableDef>* piObj = NULL;
|
41
|
+
CComObject<CTableDef>::CreateInstance(&piObj);
|
42
|
+
if (piObj)
|
43
|
+
{
|
44
|
+
piObj->m_tabledefPtr = m_dbDef->tableDefPtr(Index);
|
45
|
+
ITableDef* tbd;
|
46
|
+
piObj->QueryInterface(IID_ITableDef, (void**)&tbd);
|
47
|
+
_ASSERTE(tbd);
|
48
|
+
*Value = tbd;
|
49
|
+
}
|
49
50
|
}
|
50
|
-
else
|
51
|
-
*Value = 0;
|
52
|
-
|
53
51
|
return S_OK;
|
54
52
|
}
|
55
53
|
|
@@ -89,24 +87,22 @@ STDMETHODIMP CDbDef::InsertField(short TableIndex, short InsertIndex,
|
|
89
87
|
IFieldDef** Param3)
|
90
88
|
|
91
89
|
{
|
90
|
+
*Param3 = 0;
|
92
91
|
fielddef* fdPtr = m_dbDef->insertField(TableIndex, InsertIndex);
|
93
|
-
if (
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
92
|
+
if (fdPtr)
|
93
|
+
{
|
94
|
+
CComObject<CFieldDef>* piObj;
|
95
|
+
CComObject<CFieldDef>::CreateInstance(&piObj);
|
96
|
+
if (piObj)
|
97
|
+
{
|
98
|
+
piObj->m_tabledefPtr = m_dbDef->tableDefPtr(TableIndex);
|
99
|
+
piObj->m_index = InsertIndex;
|
100
|
+
IFieldDef* fd;
|
101
|
+
piObj->QueryInterface(IID_IFieldDef, (void**)&fd);
|
102
|
+
_ASSERTE(fd);
|
103
|
+
*Param3 = piObj;
|
104
|
+
}
|
106
105
|
}
|
107
|
-
else
|
108
|
-
*Param3 = 0;
|
109
|
-
|
110
106
|
return S_OK;
|
111
107
|
}
|
112
108
|
|
@@ -114,23 +110,23 @@ STDMETHODIMP CDbDef::InsertKey(short TableIndex, short InsertIndex,
|
|
114
110
|
IKeyDef** Param3)
|
115
111
|
|
116
112
|
{
|
113
|
+
*Param3 = 0;
|
117
114
|
keydef* keyPtr = m_dbDef->insertKey(TableIndex, InsertIndex);
|
118
|
-
if (
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
115
|
+
if (keyPtr)
|
116
|
+
{
|
117
|
+
CComObject<CKeyDef>* piObj;
|
118
|
+
CComObject<CKeyDef>::CreateInstance(&piObj);
|
119
|
+
if (piObj)
|
120
|
+
{
|
121
|
+
piObj->m_tabledefPtr = m_dbDef->tableDefPtr(TableIndex);
|
122
|
+
;
|
123
|
+
piObj->m_index = InsertIndex;
|
124
|
+
IKeyDef* kb;
|
125
|
+
piObj->QueryInterface(IID_IKeyDef, (void**)&kb);
|
126
|
+
_ASSERTE(kb);
|
127
|
+
*Param3 = piObj;
|
128
|
+
}
|
131
129
|
}
|
132
|
-
else
|
133
|
-
*Param3 = 0;
|
134
130
|
return S_OK;
|
135
131
|
}
|
136
132
|
|
@@ -245,6 +241,14 @@ STDMETHODIMP CDbDef::TdapErr(OLE_HANDLE hWnd, BSTR* Value)
|
|
245
241
|
return S_OK;
|
246
242
|
}
|
247
243
|
|
244
|
+
STDMETHODIMP CDbDef::StatMsg(BSTR* Value)
|
245
|
+
{
|
246
|
+
wchar_t tmp[1024] = { NULL };
|
247
|
+
m_dbDef->tdapErr(0, tmp);
|
248
|
+
*Value = ::SysAllocString(tmp);
|
249
|
+
return S_OK;
|
250
|
+
}
|
251
|
+
|
248
252
|
STDMETHODIMP CDbDef::ValidateTableDef(short TableIndex, short* Value)
|
249
253
|
{
|
250
254
|
*Value = m_dbDef->validateTableDef(TableIndex);
|
@@ -19,6 +19,20 @@
|
|
19
19
|
#include "stdafx.h"
|
20
20
|
#include "FieldDef.h"
|
21
21
|
#include "Flags.h"
|
22
|
+
STDMETHODIMP CFieldDef::InterfaceSupportsErrorInfo(REFIID riid)
|
23
|
+
{
|
24
|
+
static const IID* const arr[] =
|
25
|
+
{
|
26
|
+
&IID_IFieldDef
|
27
|
+
};
|
28
|
+
|
29
|
+
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
|
30
|
+
{
|
31
|
+
if (InlineIsEqualGUID(*arr[i],riid))
|
32
|
+
return S_OK;
|
33
|
+
}
|
34
|
+
return S_FALSE;
|
35
|
+
}
|
22
36
|
|
23
37
|
STDMETHODIMP CFieldDef::get_Name(BSTR* Value)
|
24
38
|
{
|
@@ -27,6 +27,7 @@ using namespace ATL;
|
|
27
27
|
class ATL_NO_VTABLE CFieldDef
|
28
28
|
: public CComObjectRootEx<CComSingleThreadModel>,
|
29
29
|
public CComCoClass<CFieldDef, &CLSID_FieldDef>,
|
30
|
+
public ISupportErrorInfo,
|
30
31
|
public IDispatchImpl<IFieldDef, &IID_IFieldDef, &LIBID_transactd,
|
31
32
|
/* wMajor = */ 1, /* wMinor = */ 0>
|
32
33
|
{
|
@@ -58,7 +59,10 @@ public:
|
|
58
59
|
BEGIN_COM_MAP(CFieldDef)
|
59
60
|
COM_INTERFACE_ENTRY(IFieldDef)
|
60
61
|
COM_INTERFACE_ENTRY(IDispatch)
|
62
|
+
COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
61
63
|
END_COM_MAP()
|
64
|
+
// ISupportsErrorInfo
|
65
|
+
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
|
62
66
|
|
63
67
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
64
68
|
|
@@ -19,6 +19,20 @@
|
|
19
19
|
#include "stdafx.h"
|
20
20
|
#include "FieldDefs.h"
|
21
21
|
#include "FieldDef.h"
|
22
|
+
STDMETHODIMP CFieldDefs::InterfaceSupportsErrorInfo(REFIID riid)
|
23
|
+
{
|
24
|
+
static const IID* const arr[] =
|
25
|
+
{
|
26
|
+
&IID_IFieldDefs
|
27
|
+
};
|
28
|
+
|
29
|
+
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
|
30
|
+
{
|
31
|
+
if (InlineIsEqualGUID(*arr[i],riid))
|
32
|
+
return S_OK;
|
33
|
+
}
|
34
|
+
return S_FALSE;
|
35
|
+
}
|
22
36
|
|
23
37
|
void CFieldDefs::FinalRelease()
|
24
38
|
{
|
@@ -28,6 +28,7 @@ class CFieldDef;
|
|
28
28
|
class ATL_NO_VTABLE CFieldDefs
|
29
29
|
: public CComObjectRootEx<CComSingleThreadModel>,
|
30
30
|
public CComCoClass<CFieldDefs, &CLSID_FieldDefs>,
|
31
|
+
public ISupportErrorInfo,
|
31
32
|
public IDispatchImpl<IFieldDefs, &IID_IFieldDefs, &LIBID_transactd,
|
32
33
|
/* wMajor = */ 1, /* wMinor = */ 0>
|
33
34
|
{
|
@@ -41,7 +42,10 @@ public:
|
|
41
42
|
BEGIN_COM_MAP(CFieldDefs)
|
42
43
|
COM_INTERFACE_ENTRY(IFieldDefs)
|
43
44
|
COM_INTERFACE_ENTRY(IDispatch)
|
45
|
+
COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
44
46
|
END_COM_MAP()
|
47
|
+
// ISupportsErrorInfo
|
48
|
+
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
|
45
49
|
|
46
50
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
47
51
|
|
@@ -24,6 +24,21 @@
|
|
24
24
|
|
25
25
|
using namespace bzs::db::protocol::tdap::client;
|
26
26
|
|
27
|
+
STDMETHODIMP CGroupQuery::InterfaceSupportsErrorInfo(REFIID riid)
|
28
|
+
{
|
29
|
+
static const IID* const arr[] =
|
30
|
+
{
|
31
|
+
&IID_IGroupQuery
|
32
|
+
};
|
33
|
+
|
34
|
+
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
|
35
|
+
{
|
36
|
+
if (InlineIsEqualGUID(*arr[i],riid))
|
37
|
+
return S_OK;
|
38
|
+
}
|
39
|
+
return S_FALSE;
|
40
|
+
}
|
41
|
+
|
27
42
|
void CGroupQuery::setResult(IGroupQuery** retVal)
|
28
43
|
{
|
29
44
|
this->QueryInterface(IID_IGroupQuery, (void**)retVal);
|
@@ -27,6 +27,7 @@ using namespace ATL;
|
|
27
27
|
class ATL_NO_VTABLE CGroupQuery
|
28
28
|
: public CComObjectRootEx<CComSingleThreadModel>,
|
29
29
|
public CComCoClass<CGroupQuery, &CLSID_GroupQuery>,
|
30
|
+
public ISupportErrorInfo,
|
30
31
|
public IDispatchImpl<IGroupQuery, &IID_IGroupQuery, &LIBID_transactd,
|
31
32
|
/* wMajor = */ 1, /* wMinor = */ 0>
|
32
33
|
{
|
@@ -43,7 +44,10 @@ public:
|
|
43
44
|
BEGIN_COM_MAP(CGroupQuery)
|
44
45
|
COM_INTERFACE_ENTRY(IGroupQuery)
|
45
46
|
COM_INTERFACE_ENTRY(IDispatch)
|
47
|
+
COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
46
48
|
END_COM_MAP()
|
49
|
+
// ISupportsErrorInfo
|
50
|
+
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
|
47
51
|
|
48
52
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
49
53
|
|
@@ -32,7 +32,7 @@ STDMETHODIMP CKeyDef::put_SegmentCount(unsigned char Value)
|
|
32
32
|
return S_OK;
|
33
33
|
}
|
34
34
|
|
35
|
-
STDMETHODIMP CKeyDef::
|
35
|
+
STDMETHODIMP CKeyDef::get_Segments(short Index, IKeySegment** Value)
|
36
36
|
{
|
37
37
|
CComObject<CKeySegment>* piObj;
|
38
38
|
CComObject<CKeySegment>::CreateInstance(&piObj);
|
@@ -24,6 +24,21 @@
|
|
24
24
|
|
25
25
|
using namespace bzs::db::protocol::tdap::client;
|
26
26
|
|
27
|
+
STDMETHODIMP CPooledDbManager::InterfaceSupportsErrorInfo(REFIID riid)
|
28
|
+
{
|
29
|
+
static const IID* const arr[] =
|
30
|
+
{
|
31
|
+
&IID_IPooledDbManager
|
32
|
+
};
|
33
|
+
|
34
|
+
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
|
35
|
+
{
|
36
|
+
if (InlineIsEqualGUID(*arr[i],riid))
|
37
|
+
return S_OK;
|
38
|
+
}
|
39
|
+
return S_FALSE;
|
40
|
+
}
|
41
|
+
|
27
42
|
STDMETHODIMP CPooledDbManager::put_MaxConnections(int n)
|
28
43
|
{
|
29
44
|
pooledDbManager::setMaxConnections(n);
|
@@ -26,6 +26,7 @@ using namespace ATL;
|
|
26
26
|
class ATL_NO_VTABLE CPooledDbManager
|
27
27
|
: public CComObjectRootEx<CComSingleThreadModel>,
|
28
28
|
public CComCoClass<CPooledDbManager, &CLSID_PooledDbManager>,
|
29
|
+
public ISupportErrorInfo,
|
29
30
|
public IDispatchImpl<IPooledDbManager, &IID_IPooledDbManager,
|
30
31
|
&LIBID_transactd, /* wMajor = */ 1, /* wMinor = */ 0>
|
31
32
|
{
|
@@ -40,7 +41,10 @@ public:
|
|
40
41
|
BEGIN_COM_MAP(CPooledDbManager)
|
41
42
|
COM_INTERFACE_ENTRY(IPooledDbManager)
|
42
43
|
COM_INTERFACE_ENTRY(IDispatch)
|
44
|
+
COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
43
45
|
END_COM_MAP()
|
46
|
+
// ISupportsErrorInfo
|
47
|
+
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
|
44
48
|
|
45
49
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
46
50
|
|
@@ -19,6 +19,21 @@
|
|
19
19
|
#include "stdafx.h"
|
20
20
|
#include "PreparedQuery.h"
|
21
21
|
|
22
|
+
STDMETHODIMP CPreparedQuery::InterfaceSupportsErrorInfo(REFIID riid)
|
23
|
+
{
|
24
|
+
static const IID* const arr[] =
|
25
|
+
{
|
26
|
+
&IID_IPreparedQuery
|
27
|
+
};
|
28
|
+
|
29
|
+
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
|
30
|
+
{
|
31
|
+
if (InlineIsEqualGUID(*arr[i],riid))
|
32
|
+
return S_OK;
|
33
|
+
}
|
34
|
+
return S_FALSE;
|
35
|
+
}
|
36
|
+
|
22
37
|
STDMETHODIMP CPreparedQuery::SupplyValue(int Index, VARIANT Value, VARIANT_BOOL* retVal)
|
23
38
|
{
|
24
39
|
if (Value.vt != VT_BSTR)
|
@@ -26,6 +26,7 @@ using namespace ATL;
|
|
26
26
|
class ATL_NO_VTABLE CPreparedQuery
|
27
27
|
: public CComObjectRootEx<CComSingleThreadModel>,
|
28
28
|
public CComCoClass<CPreparedQuery, &CLSID_PreparedQuery>,
|
29
|
+
public ISupportErrorInfo,
|
29
30
|
public IDispatchImpl<IPreparedQuery, &IID_IPreparedQuery, &LIBID_transactd,
|
30
31
|
/* wMajor = */ 1, /* wMinor = */ 0>
|
31
32
|
{
|
@@ -44,7 +45,10 @@ public:
|
|
44
45
|
BEGIN_COM_MAP(CPreparedQuery)
|
45
46
|
COM_INTERFACE_ENTRY(IPreparedQuery)
|
46
47
|
COM_INTERFACE_ENTRY(IDispatch)
|
48
|
+
COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
47
49
|
END_COM_MAP()
|
50
|
+
// ISupportsErrorInfo
|
51
|
+
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
|
48
52
|
|
49
53
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
50
54
|
|
@@ -21,6 +21,21 @@
|
|
21
21
|
#include "Table.h"
|
22
22
|
#include "Bookmark.h"
|
23
23
|
|
24
|
+
STDMETHODIMP CQueryBase::InterfaceSupportsErrorInfo(REFIID riid)
|
25
|
+
{
|
26
|
+
static const IID* const arr[] =
|
27
|
+
{
|
28
|
+
&IID_IQueryBase
|
29
|
+
};
|
30
|
+
|
31
|
+
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
|
32
|
+
{
|
33
|
+
if (InlineIsEqualGUID(*arr[i],riid))
|
34
|
+
return S_OK;
|
35
|
+
}
|
36
|
+
return S_FALSE;
|
37
|
+
}
|
38
|
+
|
24
39
|
STDMETHODIMP CQueryBase::Reset(IQueryBase** retVal)
|
25
40
|
{
|
26
41
|
m_qb.reset();
|
@@ -27,6 +27,7 @@ using namespace ATL;
|
|
27
27
|
class ATL_NO_VTABLE CQueryBase
|
28
28
|
: public CComObjectRootEx<CComSingleThreadModel>,
|
29
29
|
public CComCoClass<CQueryBase, &CLSID_QueryBase>,
|
30
|
+
public ISupportErrorInfo,
|
30
31
|
public IDispatchImpl<IQueryBase, &IID_IQueryBase, &LIBID_transactd,
|
31
32
|
/*wMajor =*/1, /*wMinor =*/0>
|
32
33
|
{
|
@@ -43,7 +44,10 @@ public:
|
|
43
44
|
BEGIN_COM_MAP(CQueryBase)
|
44
45
|
COM_INTERFACE_ENTRY(IQueryBase)
|
45
46
|
COM_INTERFACE_ENTRY(IDispatch)
|
47
|
+
COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
46
48
|
END_COM_MAP()
|
49
|
+
// ISupportsErrorInfo
|
50
|
+
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
|
47
51
|
|
48
52
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
49
53
|
|