[Oledb-dev] Provider question

Arvo arvox at hot.ee
Sat Apr 8 15:01:38 GMT 2006


Sorry to kick in :) I've deralt with siliar problems, compiling driver with VS.NET 2002. My workarounds and comments:


> The ATL that comes with VS6 needs "GetSize" in ATLDB.H line 5714:

>>         LONG cRowsInSet = pT->m_rgRowData.GetSize();

In VS 2002 there is next statement in atldb.h:

   DBROWOFFSET cRowsInSet = (DBROWOFFSET)pT->m_rgRowData.GetCount();

Probably same in VS 2005.

> Can you paste the usage from your version of ATL? Maybe we can get it so
> it will compile on both versions.

In my experiments I just duplicated declarations in PgRS.h:

	int GetSize() const
	{
	        return PQntuples(m_res);
	}
	int GetCount() const
	{
	        return PQntuples(m_res);
	}

Of course it would be correct include some VS version checking preprocessor #if.



>> and commented out part of line 154 in OleDb.cpp as shown below:
>>   if (/*category & ATL_TRACE_CATEGORY &&*/ level <= ATL_TRACE_LEVEL)

> Care to explain why this change was necessary? Is "ATL_TRACE_CATEGORY"
> not defined or something?

Yes, it is not defined. It can be defined as (I'm not sure, is this correct - but it's usable):

  #ifndef ATL_TRACE_CATEGORY
  #define ATL_TRACE_CATEGORY 0xFFFFFFFF
  #endif

somewhere in header files (I declared that in StdAfx.h), this way no cpp source code needs change.

-- 
Best regards,
 Arvo                            mailto:arvox at hot.ee



More information about the Oledb-devel mailing list