Click here to Skip to main content
16,005,236 members
Home / Discussions / Database
   

Database

 
GeneralAccessing Visual Fox Pro 3.0 Data Pin
sybux200025-Feb-03 11:00
sybux200025-Feb-03 11:00 
GeneralRe: Accessing Visual Fox Pro 3.0 Data Pin
andyharman26-Feb-03 0:43
professionalandyharman26-Feb-03 0:43 
GeneralRe: Accessing Visual Fox Pro 3.0 Data Pin
sybux200026-Feb-03 5:06
sybux200026-Feb-03 5:06 
GeneralSelect statement Pin
User 988525-Feb-03 8:34
User 988525-Feb-03 8:34 
GeneralRe: Select statement Pin
Jeremy Oldham25-Feb-03 14:19
Jeremy Oldham25-Feb-03 14:19 
GeneralRe: Select statement Pin
User 988525-Feb-03 15:28
User 988525-Feb-03 15:28 
GeneralRe: Select statement Pin
karl_w26-Feb-03 0:03
karl_w26-Feb-03 0:03 
Generalnew CDaoRecordset in a DLL Problem Pin
Crercio O. Silva24-Feb-03 17:02
Crercio O. Silva24-Feb-03 17:02 
Hi,

I have created a DLL which access the DAO objects (specially MSAccess
databases). In the code I create the CDaoRecordset with the new operator,
like this:

CDaoRecordset * CDaoClass::Query(CString query)
{
CDaoRecordset * pNewRecord = new CDaoRecordset(&m_pDatabase);
pNewRecord->Open(AFX_DAO_USE_DEFAULT_TYPE, query, 0);

return pNewRecord;
}

CDaoClass::CloseRecordSet(CDaoRecordset * pRecord)
{
pRecord->Close();
delete pRecord;
}

This works just as it should if the classes are in the main application,
but I'm getting an exception when in DLL the CDaoRecordset::Open() method
is executed. The other DAO methods are working fine, so I can list the
tables, change them, create indexes, relationships, etc. But I can't
execute queries that returns data.
When debugging the application I found out that there is an exception in
DAOCORE.CPP line 4855, shown bellow:

void CDaoRecordset::BuildSelectList()
{
ASSERT_VALID(this);
ASSERT(m_nFields > 0); // This line will assert since m_nFields is 0

m_strSQL += _afxSelect2;

CDaoFieldExchange fx(CDaoFieldExchange::AddToSelectList, this);
DoFieldExchange(&fx);
}

Does anyone have any clues about it?

Thanks in advance.

Crercio O. Silva / DBTools


Crercio O. Silva / DBTools Development
http://www.dbtools.com.br
GeneralMS SQL Server Licencing issues Pin
Scorp1us21-Feb-03 4:23
Scorp1us21-Feb-03 4:23 
GeneralRe: MS SQL Server Licencing issues Pin
Topper Price21-Feb-03 14:42
Topper Price21-Feb-03 14:42 
GeneralRe: MS SQL Server Licencing issues Pin
Antares68625-Feb-03 0:51
Antares68625-Feb-03 0:51 
GeneralADO,VC++,AutoNumber,Access Pin
Kamesh20-Feb-03 22:43
Kamesh20-Feb-03 22:43 
GeneralProblem with SQLDMO Pin
fabjoe20-Feb-03 21:05
fabjoe20-Feb-03 21:05 
GeneralRe: Problem with SQLDMO Pin
Antares68625-Feb-03 0:31
Antares68625-Feb-03 0:31 
GeneralRe: Problem with SQLDMO Pin
fabjoe25-Feb-03 2:25
fabjoe25-Feb-03 2:25 
GeneralADO CreateParameter Pin
devvvy20-Feb-03 15:09
devvvy20-Feb-03 15:09 
GeneralRe: ADO CreateParameter Pin
Jon Hulatt21-Feb-03 0:36
Jon Hulatt21-Feb-03 0:36 
GeneralRe: ADO CreateParameter Pin
devvvy21-Feb-03 3:13
devvvy21-Feb-03 3:13 
GeneralDB2-to-Excel Pin
Jassim Rahma20-Feb-03 12:44
Jassim Rahma20-Feb-03 12:44 
GeneralMySQL HELL on RedHat Linux 7.2 Pin
Masaaki Onishi20-Feb-03 12:27
Masaaki Onishi20-Feb-03 12:27 
GeneralRe: MySQL HELL on RedHat Linux 7.2 Pin
Scorp1us21-Feb-03 4:30
Scorp1us21-Feb-03 4:30 
GeneralRe: MySQL HELL on RedHat Linux 7.2 Pin
Topper Price21-Feb-03 14:45
Topper Price21-Feb-03 14:45 
GeneralRe: MySQL HELL on RedHat Linux 7.2 Pin
Scorp1us21-Feb-03 14:55
Scorp1us21-Feb-03 14:55 
GeneralRe: MySQL HELL on RedHat Linux 7.2 Pin
David Wulff22-Feb-03 17:02
David Wulff22-Feb-03 17:02 
GeneralNumber of records in Access database Pin
Majid Shahabfar20-Feb-03 3:03
Majid Shahabfar20-Feb-03 3:03 

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.