TheMillionDollarMan
Programmer
Hi,
I would like to create a class that handles my ADO database tasks. Here is my idea.
1. Delcare as public _RecordsetPtr then access all of its filds etc from another class.
2.
A.Declare a variable to _RecordsetPtr as private and have class memeber functions perform all of the database tasks. like _RecordsetPtr->MoveNext()
B. Map the fields of the Recordset to a public array so that a child class can access the data.
Problem:
When I put this into the header file ..
Public:
_RecordsetPtr spRSGlobal;
or even
Protected:
_RecordsetPtr spRSGlobal;
or even at the top of the implementation file..
_RecordsetPtr spRSGlobal;
The program compiles but then throws an exception when the program is starting up.
1. I have a global instance on the connection pointer and this doesn't create a problem.
Why can't I declare a global or even private variable of _RecordsetPtr type?
Thanks
Dave
VC++ 6.0
Windows 2000
MDAC version 2.1
Oracle 8.1.6
I would like to create a class that handles my ADO database tasks. Here is my idea.
1. Delcare as public _RecordsetPtr then access all of its filds etc from another class.
2.
A.Declare a variable to _RecordsetPtr as private and have class memeber functions perform all of the database tasks. like _RecordsetPtr->MoveNext()
B. Map the fields of the Recordset to a public array so that a child class can access the data.
Problem:
When I put this into the header file ..
Public:
_RecordsetPtr spRSGlobal;
or even
Protected:
_RecordsetPtr spRSGlobal;
or even at the top of the implementation file..
_RecordsetPtr spRSGlobal;
The program compiles but then throws an exception when the program is starting up.
1. I have a global instance on the connection pointer and this doesn't create a problem.
Why can't I declare a global or even private variable of _RecordsetPtr type?
Thanks
Dave
VC++ 6.0
Windows 2000
MDAC version 2.1
Oracle 8.1.6