Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Table does not exist with Oracle 9i and ATL COM
I used the Visual C++ 6.0 ATL COM wizard. When you insert a Data
Provider into a ATL COM project, it first displays a list of data
providers. I selected Oracle Provider for OLEDB and clicked NEXT. It
then displays a text box for entering a Service Name (or SID?) and a
User Name and a Password. I entered the info and it next displayed a
list of all the tables and procedures in the Oracle 9i database.
You can then select any table or procedure and Visual C++ will create a new header file in the project that you can then use to connect to the database, open the table (you select) and fetch data from it.
I did this for 2 different tables that were both in the SAME schema.
WEBADMIN.
One table is named VANSWERDTL the other is XML_DOCUMENTS. In Visual
C++ , they are named WEBADMIN.VANSWERDTL and WEBADMIN.XML_DOCUMENTS.
Visual C++ creates a separate set of classes for each table.
For VANSWERDTL the classes created are:
class CWEBADMINVANSWERDTLAccessor ;
class CWEBADMINVANSWERDTL ; public CTable<
CAccessor<CWEBADMINVANSWERDTLAccessor> >
For the XML_DOCUMENTS class there is a similar set of 2 classes
created:
class CWEBADMINXMLDOCUMENTSAccessor;
class CWEBADMINXMLDOCUMENTS : public CTable< CAccessor<
CWEBADMINXMLDOCUMENTSAccessor> >;
The "Accessor" class has a public method: HRESULT OpenRowset( void ); which in both cases has 1 line of code:
For the VANSWERDTL class the OpenRowset method is:
HRESULT CWEBADMINVANSWERDTL::OpenRowset() {
return CTable<CAccessor< > >::Open( m_Session,
_T("WEBADMIN.VANSWERDTL");
}
For the XML_DOCUMENTS table, the OpenRowset method also has 1 line of
code:
HRESULT CWEBADMINXMLDOCUMENTS::OpenRowset()
{
return CTable<CAccessor< > >::Open( m_Session, _T("WEBADMIN.XML_DOCUMENTS"); }
The OpenRowset method for the VANSWERDTL works fine. But the OpenRowset method for the XML_DOCUMENTS table always returns "TABLE DOES NOT EXIST". I can see both tables. They are both in the same schema. cbb
On Mon, 12 May 2003 20:28:25 +0200, Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl> wrote:
>On Mon, 12 May 2003 15:17:57 GMT, charles b black <cboozb_at_pacbell.net>
>wrote:
>
>>I am using Oracle 8.1.7 client and the matching Oracle Provider for
>>OLEDB (downloaded together from Oracle) to access an Oracle 9i
>>database. I used Visual C++ 6.0 to create an ATL COM project to access
>>one table in the database. But the call to OpenRowset fails with Table
>>does not exist (hr = -21477217865, Ox80040e37).
>>cb
>
>
>Which table? To which schema where you connected? Does this schema
>have privilege?
>Do you ask us to guess everything?
>
>
>Sybrand Bakker, Senior Oracle DBA
>
>To reply remove -verwijderdit from my e-mail address
Received on Mon May 12 2003 - 14:32:00 CDT
![]() |
![]() |