Why MFC force cursor library usage for non read-only snapshot ? 
Author Message
 Why MFC force cursor library usage for non read-only snapshot ?

ENV : VC++ 5.0  (sp3) + Win NT 4 (sp3) + ODBC 3.5 + Intersolv Driver For
Oracle 8 (3.10 beta)

Hi,

I've a question on the CRecordset source code. Why, in the
CRecordset::AllocHstmt() method, MFC force the usage of the cursor lib
when the m_pDatabase is not already opened, we are in snapshot mode and
we doesn't specified read only recordset  (see following code exctract
from dbcore.cpp, line 2585) ?

BOOL CRecordset::AllocHstmt()
{
        ...

// If not already opened, attempt to open
if (!m_pDatabase->IsOpen())
{
                BOOL bUseCursorLib = m_bUseODBCCursorLib;

        // If non-readOnly snapshot request must use cursor lib
                if (m_nOpenType == snapshot && !(m_dwOptions &
readOnly))
        {
                        // This assumes drivers only support readOnly
snapshots
                        bUseCursorLib = TRUE;
        }

                ...

Quote:
}

...

Quote:
}

Gaetano Di Gregorio
Software Engineer

Office Address:         Walsh International Development Group
                                Waterloo Office Park
                                Dreve Richelle, 161 b
                                B-1410 Waterloo
                                Belgium


Office Phone:           +32-2-3510000
Office Fax:             +32-2-3530404



Mon, 18 Sep 2000 03:00:00 GMT  
 Why MFC force cursor library usage for non read-only snapshot ?

Unfortunately, I don't know the answer to your question. I was wondering the
same thing though. I would like to not use the cursor library if at all
possible. There is a bug in it (ODBC 3.5) that is causing me great grief.

Jon


Quote:
>ENV : VC++ 5.0  (sp3) + Win NT 4 (sp3) + ODBC 3.5 + Intersolv Driver For
>Oracle 8 (3.10 beta)

>Hi,

>I've a question on the CRecordset source code. Why, in the
>CRecordset::AllocHstmt() method, MFC force the usage of the cursor lib
>when the m_pDatabase is not already opened, we are in snapshot mode and
>we doesn't specified read only recordset  (see following code exctract
>from dbcore.cpp, line 2585) ?

>BOOL CRecordset::AllocHstmt()
>{
> ...

>// If not already opened, attempt to open
>if (!m_pDatabase->IsOpen())
>{
> BOOL bUseCursorLib = m_bUseODBCCursorLib;

> // If non-readOnly snapshot request must use cursor lib
> if (m_nOpenType == snapshot && !(m_dwOptions &
>readOnly))
> {
> // This assumes drivers only support readOnly
>snapshots
> bUseCursorLib = TRUE;
> }

> ...
>}

>...
>}

>Gaetano Di Gregorio
>Software Engineer

>Office Address: Walsh International Development Group
> Waterloo Office Park
> Dreve Richelle, 161 b
> B-1410 Waterloo
> Belgium


>Office Phone: +32-2-3510000
>Office Fax: +32-2-3530404



Fri, 22 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ODBC cursors required for snapshot support, why?

2. ODBC cursors required for snapshot support, why?

3. set_new_handler in non MFC library called from MFC application

4. Calling mfc library from non-mfc program

5. Link errors with MFC app and non-MFC library

6. Error-ODBC static cursors required for snapshot support.

7. Forcing MFC to read message queue

8. usage of _Tree class in MFC's Xtree library

9. forcing wrapper function usage

10. Why no MFC AppWizard (static library)?

11. Why MFC still is not OO library ?

12. Mouse Cursor forced updates

 

 
Powered by phpBB® Forum Software