Roy,
Have a look in the registry on any machine that has MDAC 2.5 or later
installed.
When you say registry are you talking about the ProviderName.re g files. My
(atl) provider does not seem to have one, I believe it was registered
automatically. The closest I have come to finding it is a file called
"REGISTRY" which just contains binary data, and a file called .rgs. But I
have a feeling that the provider is registered successfully as I can view it
in Borland Builder's list of available Ole Db providers, and I have
successfully created a client that can access it??? (Using Regedit I can
only find what I showed you last time).
Now I think we are looking at an oledb provider that does not implement
all of the required interfaces.
I am sure this is true!!!!
and specifically, have you implemented the IDBSchemaRowset interface?
I believe I have (to a degree) but I don't really understand what is going
on here (I just went through Lon Fishers article step by step, which told me
what to do but not always why!). In my CDFapSess.h class I have the
following three implementations for:
class CCDFapSessionTR SchemaRowset;
class CCDFapSessionCo lSchemaRowset;
class CCDFapSessionPT SchemaRowset;
i.e....
class CCDFapSessionTR SchemaRowset :
public CSchemaRowsetIm pl< CCDFapSessionTR SchemaRowset, CTABLESRow,
CCDFapSession>
{
public:
BEGIN_PROPSET_M AP(CCDFapSessio nTRSchemaRowset )
BEGIN_PROPERTY_ SET(DBPROPSET_R OWSET)
PROPERTY_INFO_E NTRY(IAccessor)
PROPERTY_INFO_E NTRY(IColumnsIn fo)
PROPERTY_INFO_E NTRY(IConvertTy pe)
PROPERTY_INFO_E NTRY(IRowset)
PROPERTY_INFO_E NTRY(IRowsetIde ntity)
PROPERTY_INFO_E NTRY(IRowsetInf o)
PROPERTY_INFO_E NTRY(CANFETCHBA CKWARDS)
PROPERTY_INFO_E NTRY(CANHOLDROW S)
PROPERTY_INFO_E NTRY(CANSCROLLB ACKWARDS)
PROPERTY_INFO_E NTRY_VALUE(MAXO PENROWS, 0)
PROPERTY_INFO_E NTRY_VALUE(MAXR OWS, 0)
END_PROPERTY_SE T(DBPROPSET_ROW SET)
END_PROPSET_MAP ()
HRESULT Execute(LONG* pcRowsAffected, ULONG, const VARIANT*)
{
USES_CONVERSION ;
//CTextFile tf;
CTABLESRow trData;
lstrcpyW(trData .m_szType, OLESTR("TABLE") );
lstrcpyW(trData .m_szDesc, OLESTR("The Text File Table"));
TCHAR szFile[255];
_tcscpy(szFile, _T("c:\\code\\m yprov\\sample.t xt"));
lstrcpynW(trDat a.m_szTable, T2OLE(szFile),
SIZEOF_MEMBER(C TABLESRow, m_szTable));
if (!m_rgRowData.A dd(trData))
return E_OUTOFMEMORY;
*pcRowsAffected = 1;
return S_OK;
}//END OF Execute
It will look into it further as it is not implemented properly yet.
Thanks,
Duncan.