Click here to Skip to main content
15,912,329 members
Home / Discussions / Database
   

Database

 
GeneralRe: Building a custom server program Pin
3-May-01 17:54
suss3-May-01 17:54 
GeneralSQL Server Filegroups Pin
Des McHugh9-Apr-01 6:43
Des McHugh9-Apr-01 6:43 
GeneralRe: SQL Server Filegroups Pin
Jason Cono14-May-01 9:13
Jason Cono14-May-01 9:13 
GeneralADO _ConnectionPtr Problem Pin
AndyC5-Apr-01 6:43
AndyC5-Apr-01 6:43 
GeneralRemote access to MS Access - Please Help! Pin
Josie Marent3-Apr-01 6:48
Josie Marent3-Apr-01 6:48 
GeneralRe: Remote access to MS Access - Please Help! Pin
Anders Molin8-Apr-01 3:36
professionalAnders Molin8-Apr-01 3:36 
QuestionNT service cause ADO's Open() function hang? Pin
2-Apr-01 18:29
suss2-Apr-01 18:29 
GeneralADO problem Pin
#realJSOP30-Mar-01 9:52
professional#realJSOP30-Mar-01 9:52 
Visual C++ 6.0, sp5
NT4, sp5

I'm working on an app that uses ADO to access an oracle database. The following code is part of the function that opens a recordset (try/catch stuff removed for the sake of brevity):

Fields* m_pFields = NULL;
SAFE_CALL(m_piRecordSet->Open(vSQL, vConnection, adOpenDynamic, adLockOptimistic, adCmdText));
int m_nRecordCount = m_piRecordSet->GetRecordCount();
SAFE_CALL(m_piRecordSet->get_Fields(&m_pFields));


...and this is a code snippet from the function we use to close the recordset:

if (m_pFields)
{
    m_pFields->Release();
}
SAFE_CALL(m_piRecordSet->Close());
m_piRecordSet.Release();
m_piRecordSet = NULL;


The problem is with the m_pFields variable.

The first 10 or so times we call the function containing this code, it's a valid pointer. On or about the nth time, the variable is NULL. Actually "not initialized" would be a better description of it's state, because if we don't set it to NULL before calling the get_Fields() function, it's value is 0xcccccccc.

As far as I can tell, we close the recordset when we're done with it. Otherwise, we'd get an error message from Oracle saying we have too many open cursors.

Has anyone got any idea why this might be happening?
GeneralAcces Violation with oledb CoUninitialize() instruction Pin
25-Mar-01 23:12
suss25-Mar-01 23:12 
GeneralRe: Acces Violation with oledb CoUninitialize() instruction Pin
15-Apr-01 13:53
suss15-Apr-01 13:53 
GeneralRe: Acces Violation with oledb CoUninitialize() instruction Pin
Julien23-Apr-01 16:33
Julien23-Apr-01 16:33 
GeneralStreams Pin
ernst.maurer19-Mar-01 23:10
ernst.maurer19-Mar-01 23:10 
GeneralRe: Streams Pin
9-Apr-01 3:46
suss9-Apr-01 3:46 
GeneralStreams Pin
ernst.maurer19-Mar-01 23:02
ernst.maurer19-Mar-01 23:02 
Generaldata communication method Pin
Irfan12-Mar-01 3:28
Irfan12-Mar-01 3:28 
GeneralRe: data communication method Pin
Anders Molin19-Mar-01 7:01
professionalAnders Molin19-Mar-01 7:01 
Generaldata communication method Pin
Irfan12-Mar-01 3:27
Irfan12-Mar-01 3:27 
GeneralGetting Interbase Data through ADO. Pin
5-Mar-01 18:00
suss5-Mar-01 18:00 
GeneralNested outer joins Pin
5-Mar-01 0:20
suss5-Mar-01 0:20 
GeneralRe: Nested outer joins Pin
Bob Zagars17-Jan-06 20:48
Bob Zagars17-Jan-06 20:48 
GeneralADO RecordSet Paging & Netscape Pin
4-Mar-01 4:55
suss4-Mar-01 4:55 
GeneralProblem with a MTS-DAL (Data Access Layer) VB Object Pin
2-Mar-01 12:09
suss2-Mar-01 12:09 
GeneralAdding first record in the Database Pin
yamini2-Mar-01 0:05
yamini2-Mar-01 0:05 
GeneralRe: Adding first record in the Database Pin
14-Mar-01 7:02
suss14-Mar-01 7:02 
QuestionMS-SQL use HASHING for text key..??!?!? Pin
26-Feb-01 11:00
suss26-Feb-01 11:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.