Click here to Skip to main content
15,884,298 members
Articles / Desktop Programming / MFC

Creating an OLE DB Data Provider

Rate me:
Please Sign up or sign in to vote.
3.45/5 (13 votes)
12 Jan 20029 min read 128.1K   3.4K   69  
This article shows how to create an OLE DB Data Provider that wraps both a C struct and C++ class containing data that is to be made accessible by a SQL query.
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by SensorTest.rc
//
#define IDS_PROJNAME                    100
#define IDR_MYSENSOR                    102
#define IDS_DBPROP_ACTIVESESSIONS       103
#define IDS_DBPROP_ASYNCTXNCOMMIT       104
#define IDS_DBPROP_BYREFACCESSORS       105
#define IDS_DBPROP_CATALOGLOCATION      106
#define IDS_DBPROP_CATALOGTERM          107
#define IDS_DBPROP_CATALOGUSAGE         108
#define IDS_DBPROP_COLUMNDEFINITION     109
#define IDS_DBPROP_CONCATNULLBEHAVIOR   110
#define IDS_DBPROP_DATASOURCENAME       111
#define IDS_DBPROP_DATASOURCEREADONLY   112
#define IDS_DBPROP_DBMSNAME             113
#define IDS_DBPROP_DBMSVER              114
#define IDS_DBPROP_PROCEDURETERM        115
#define IDS_DBPROP_PROVIDEROLEDBVER     116
#define IDS_DBPROP_PROVIDERNAME         117
#define IDS_DBPROP_PROVIDERVER          118
#define IDS_DBPROP_QUOTEDIDENTIFIERCASE 119
#define IDS_DBPROP_SCHEMATERM           120
#define IDS_DBPROP_SCHEMAUSAGE          121
#define IDS_DBPROP_SQLSUPPORT           122
#define IDS_DBPROP_STRUCTUREDSTORAGE    123
#define IDS_DBPROP_SUBQUERIES           124
#define IDS_DBPROP_SUPPORTEDTXNISOLEVELS 125
#define IDS_DBPROP_SUPPORTEDTXNISORETAIN 126
#define IDS_DBPROP_TABLETERM            127
#define IDS_DBPROP_USERNAME             128
#define IDS_DBPROP_SUPPORTEDTXNDDL      129
#define IDS_DBPROP_ASYNCTXNABORT        130
#define IDS_DBPROP_DSOTHREADMODEL       131
#define IDS_DBPROP_MULTIPLEPARAMSETS    132
#define IDS_DBPROP_OUTPUTPARAMETERAVAILABILITY 133
#define IDS_DBPROP_PERSISTENTIDTYPE     134
#define IDS_DBPROP_NOTIFYCOLUMNSET      135
#define IDS_DBPROP_NOTIFYROWDELETE      136
#define IDS_DBPROP_NOTIFYROWFIRSTCHANGE 137
#define IDS_DBPROP_NOTIFYROWINSERT      138
#define IDS_DBPROP_NOTIFYROWRESYNCH     139
#define IDS_DBPROP_NOTIFYROWSETRELEASE  140
#define IDS_DBPROP_NOTIFYROWSETFETCHPOSITIONCHANGE 141
#define IDS_DBPROP_NOTIFYROWUNDOCHANGE  142
#define IDS_DBPROP_NOTIFYROWUNDODELETE  143
#define IDS_DBPROP_GROUPBY              144
#define IDS_DBPROP_HETEROGENEOUSTABLES  145
#define IDS_DBPROP_IDENTIFIERCASE       146
#define IDS_DBPROP_LOCKMODES            147
#define IDS_DBPROP_MAXINDEXSIZE         148
#define IDS_DBPROP_MAXROWSIZE           149
#define IDS_DBPROP_MAXROWSIZEINCLUDESBLOB 150
#define IDS_DBPROP_MAXTABLESINSELECT    151
#define IDS_DBPROP_MULTIPLESTORAGEOBJECTS 152
#define IDS_DBPROP_MULTITABLEUPDATE     153
#define IDS_DBPROP_NOTIFICATIONPHASES   154
#define IDS_DBPROP_NULLCOLLATION        155
#define IDS_DBPROP_OLEOBJECTS           156
#define IDS_DBPROP_ORDERBYCOLUMNSINSELECT 157
#define IDS_DBPROP_PREPARECOMMITBEHAVIOR 158
#define IDS_DBPROP_PREPAREABORTBEHAVIOR 159
#define IDS_DBPROP_NOTIFYROWUNDOINSERT  160
#define IDS_DBPROP_NOTIFYROWUPDATE      161
#define IDS_DBPROP_ROWSETCONVERSIONSONCOMMAND 162
#define IDS_DBPROP_MULTIPLERESULTS      163
#define IDS_DBPROP_ISequentialStream    164
#define IDS_DBPROP_ABORTPRESERVE        165
#define IDS_DBPROP_BLOCKINGSTORAGEOBJECTS 166
#define IDS_DBPROP_IRowsetScroll        167
#define IDS_DBPROP_IRowsetUpdate        168
#define IDS_DBPROP_ISupportErrorInfo    169
#define IDS_DBPROP_CHANGEINSERTEDROWS   170
#define IDS_DBPROP_RETURNPENDINGINSERTS 171
#define IDS_DBPROP_IConvertType         172
#define IDS_DBPROP_AUTH_CACHE_AUTHINFO  173
#define IDS_DBPROP_AUTH_ENCRYPT_PASSWORD 174
#define IDS_DBPROP_AUTH_INTEGRATED      175
#define IDS_DBPROP_AUTH_MASK_PASSWORD   176
#define IDS_DBPROP_AUTH_PASSWORD        177
#define IDS_DBPROP_AUTH_PERSIST_ENCRYPTED 178
#define IDS_DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO 179
#define IDS_DBPROP_AUTH_USERID          180
#define IDS_DBPROP_INIT_DATASOURCE      181
#define IDS_DBPROP_INIT_HWND            182
#define IDS_DBPROP_INIT_IMPERSONATION_LEVEL 183
#define IDS_DBPROP_INIT_LOCATION        184
#define IDS_DBPROP_INIT_MODE            185
#define IDS_DBPROP_INIT_PROMPT          186
#define IDS_DBPROP_INIT_PROTECTION_LEVEL 187
#define IDS_DBPROP_INIT_TIMEOUT         188
#define IDS_DBPROP_INIT_LCID            189
#define IDS_DBPROP_INIT_PROVIDERSTRING  190
#define IDS_DBPROP_SESS_AUTOCOMMITISOLEVELS 191
#define IDS_DBPROP_SERVERCURSOR         192
#define IDS_DBPROP_TRANSACTEDOBJECT     193
#define IDS_DBPROP_UPDATABILITY         194
#define IDS_DBPROP_STRONGIDENTITY       195
#define IDS_DBPROP_IAccessor            196
#define IDS_DBPROP_IColumnsInfo         197
#define IDS_DBPROP_IColumnsRowset       198
#define IDS_DBPROP_IConnectionPointContainer 199
#define IDS_DBPROP_IProvideMoniker      200
#define IDS_DBPROP_IRowset              205
#define IDS_DBPROP_IRowsetChange        206
#define IDS_DBPROP_IRowsetIdentity      207
#define IDS_DBPROP_IRowsetInfo          208
#define IDS_DBPROP_IRowsetLocate        209
#define IDS_DBPROP_IRowsetResynch       210
#define IDS_DBPROP_BOOKMARKS            211
#define IDS_DBPROP_BOOKMARKSKIPPED      212
#define IDS_DBPROP_BOOKMARKTYPE         213
#define IDS_DBPROP_CANFETCHBACKWARDS    214
#define IDS_DBPROP_CANHOLDROWS          215
#define IDS_DBPROP_APPENDONLY           216
#define IDS_DBPROP_CANSCROLLBACKWARDS   217
#define IDS_DBPROP_COLUMNRESTRICT       218
#define IDS_DBPROP_COMMANDTIMEOUT       219
#define IDS_DBPROP_COMMITPRESERVE       220
#define IDS_DBPROP_DELAYSTORAGEOBJECTS  221
#define IDS_DBPROP_IMMOBILEROWS         222
#define IDS_DBPROP_LITERALBOOKMARKS     223
#define IDS_DBPROP_LITERALIDENTITY      224
#define IDS_DBPROP_MAXOPENROWS          225
#define IDS_DBPROP_MAXPENDINGROWS       226
#define IDS_DBPROP_MAXROWS              227
#define IDS_DBPROP_OTHERINSERT          228
#define IDS_DBPROP_OTHERUPDATEDELETE    229
#define IDS_DBPROP_OWNINSERT            230
#define IDS_DBPROP_OWNUPDATEDELETE      231
#define IDS_DBPROP_QUICKRESTART         232
#define IDS_DBPROP_REENTRANTEVENTS      233
#define IDS_DBPROP_REMOVEDELETED        234
#define IDS_DBPROP_REPORTMULTIPLECHANGES 235
#define IDS_DBPROP_ROWRESTRICT          236
#define IDS_DBPROP_ROWTHREADMODEL       237
#define IDS_DBPROP_ORDEREDBOOKMARKS     238

// Next default values for new objects
// 
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE        201
#define _APS_NEXT_COMMAND_VALUE         32768
#define _APS_NEXT_CONTROL_VALUE         201
#define _APS_NEXT_SYMED_VALUE           239
#endif
#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
David Utz
Senior Software Engineer
Analytical Graphics, Inc.
40 General Warren Blvd.
Malvern, PA 19355
dutz@stk.com

Comments and Discussions