This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bug report


Platform : Windows98se
gcc version: 3.2.3 ( mingw special 20030504-1 )

I declare interface like this:
	
DECLARE_INTERFACE(IADORecordset)
{
	...
	STDMETHOD(CursorType)(THIS_ CursorTypeEnum plCursorType) PURE;
	...
	STDMETHOD(CursorLocation)(THIS_ CursorLocation plCursorLocation) PURE;
	...
	STDMETHOD(Open)(THIS_ VARIANT Source,VARIANT Activeconnection,CursorTypeEnum CursorType,LockTypeEnum LockType,long Options) PURE;
	...
}

I Opera like this:
	
	IADORecordset * rs =NULL;
	HRESULT hr;
	hr = CoCreateInstance(CLSID_ADORecordset,NULL,CLSCTX_INPROC_SERVER,IID_ADORecordset,(PVOID*)&rs);
	if(hr== S_OK)
	{
		rs->CursorType(adOpenDynamic); //ado interface Opera
		rs->CursorLocation(adUseClient); //Cursor type is User Client
		rs->Open(sqltext,ctnstr,adOpenDynamic,adLockOptimistic,1);
		
		//sqltext and ctnstr are BSTR type
		
		rs->Close();
		rs->Release();
	}
	...

error:
1. no matching function for call to "IADORecordset::Open(

2. candidates are: virtual HRESULT

why I get this error ? what can I do about it ?

I don't like use ODBC interface to develop software, what can I do ?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]