Background: My program is a tracking program that stores the data in an MS Access database. It was originally developed using MS VC++ 6.0 (w/ latest SP), and the database was created using MS Access 97. OS I used when compiling was Win98.
The Problem: Users of Windows 2000 and Windows XP are getting an Internal Application Error when running the program. After upgrading myself to Office XP and Windows 2000, I ran the old version that gave everyone so many problems, and it ran fine on my system. This indicated to me that the problem wasn't necessarily in the OS of the user, but in the development tools that I have and most other people don't.
I compiled a Debug version for a friend that was getting the error, and he told me he was getting an Assertion error in daocore.cpp line 453 (Something about DAO failing to initialize). I had him get all of the latest DAO components that I could think of (mdac 2.7.xxx for example). I confirmed that he has the DAO35.DDL and DAO36.DLL files, etc. Nothing I can think of seems to work.
My thinking is that I have some DLL on my system that is allowing the program to init DAO, and access the database. It seems other people don't have this DLL. I'm not sure what to do next.
I have, in the past, had the compile include the DLLs in the compiled version (instead of just linking to them), and that didn't seem to help. This was before my Win2k upgrade and my OfficeXP upgrade... so I'm not sure if that solution would work now.
Code Snippets:
The following is some examples of how I'm opening the DB, and such... so y'all know what method I'm using...
This is the entire .h file for the main portion of the program (the one that specifically deals with the database stuff)
// CharTrackerDlg.h : header file
//
#if !defined(AFX_CHARTRACKERDLG_H__67C7A367_25C8_11D3_A2E9_0080296575B5__INCLUDED_)
#define AFX_CHARTRACKERDLG_H__67C7A367_25C8_11D3_A2E9_0080296575B5__INCLUDED_
#include "OScopeCtrl.h" // Added by ClassView
#include "CharSet.h" // Added by ClassView
#include "SkillSet.h" // Added by ClassView
#include "StatSet.h" // Added by ClassView
#include "PrefsSet.h" // added by JM
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CCharTrackerDlg dialog
class CCharTrackerDlg : public CDialog
{
// Construction
public:
CString m_UOA;
// CString m_UOdir;
HWND m_hUOAssist;
CCharTrackerDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CCharTrackerDlg)
enum { IDD = IDD_CHARTRACKER_DIALOG };
CButton m_StartUO;
CComboBox m_GraphCombo;
CComboBox m_CharCombo;
CComboBox m_PrefSkill9;
CComboBox m_PrefSkill8;
CComboBox m_PrefSkill7;
CComboBox m_PrefSkill6;
CComboBox m_PrefSkill5;
CComboBox m_PrefSkill4;
CComboBox m_PrefSkill3;
CComboBox m_PrefSkill2;
CComboBox m_PrefSkill10;
CComboBox m_PrefSkill1;
CStatic m_GraphValue;
CEdit m_AgeValue;
CEdit m_TimeLeft;
CEdit m_HighSkill;
CEdit m_UOALINK;
CEdit m_Tracking;
CEdit m_Totals;
CStatic m_Skill;
CStatic m_Skill1;
CStatic m_Skill2;
CStatic m_Skill3;
CStatic m_Skill4;
CStatic m_Skill5;
CStatic m_Skill6;
CStatic m_Skill7;
CStatic m_Skill8;
CStatic m_Skill9;
CStatic m_Skill10;
CEdit m_Profession;
CEdit m_Profession2;
CButton m_GotoBegin;
CButton m_GoBack;
CButton m_GoForward;
CButton m_GotoEnd;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCharTrackerDlg)
public:
virtual BOOL DestroyWindow();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
void RequerySet(int num, CString filter);
void CreateNewCharacter(CString strCharName, CString UserID);
void SetupGraphCombo();
void SetCurrentChar(int CharID);
void RefreshCharBox();
void FirstRecord();
void SetupPrefSets();
int SeedSkillNumbers(int [49]);
float SeedSkillArray(float [49]);
// HERE IS THE DATABASE DEFINITION
CDaoDatabase m_Db;
CDaoDatabase m_PrefsDb;
CStatSet* m_pStatSet;
CSkillSet* m_pSkillSet;
PrefsSet* m_pPrefsSet;
CCharSet* m_pCharSet;
COScopeCtrl m_GraphControl;
HICON m_hIcon;
int m_lLimit;
int m_lMaxRecords;
// Generated message map functions
//{{AFX_MSG(CCharTrackerDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnSelchangeComboChar();
afx_msg void OnSelchangeComboGraph();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void ProfUpdate();
afx_msg void OnStaticTimer();
afx_msg void OnStartUO();
afx_msg void OnGotobegin();
afx_msg void OnGoback();
afx_msg void OnGoforward();
afx_msg void OnGotoend();
afx_msg void OnSelchangePrefskill1();
afx_msg void OnSelchangePrefskill2();
afx_msg void OnSelchangePrefskill3();
afx_msg void OnSelchangePrefskill4();
afx_msg void OnSelchangePrefskill5();
afx_msg void OnSelchangePrefskill6();
afx_msg void OnSelchangePrefskill7();
afx_msg void OnSelchangePrefskill8();
afx_msg void OnSelchangePrefskill9();
afx_msg void OnSelchangePrefskill10();
afx_msg void OnChangeEditUoalink();
//}}AFX_MSG
afx_msg LRESULT onUserLogon(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT onUserLogoff(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
As you can see, I'm using CDaoDatabase
Now here is where I actually open the database file in the program's main .cpp file.
m_Db.Open(".\\CharTracker.dat");
m_PrefsDb.Open(".\\CharTrackerPrefs.dat");
Now I'll be the first to admit I'm a novice programmer. I'm not entirely sure how all of this stuff works. I'm looking for some help in getting past this error. Really, it's the last hurdle before this thing is ready for Win2k and WinXP users...
I'll answer any other questions that anyone asks to help track down the problem.
Thanks in advance!
[edited by - EagleEye1975 on May 5, 2002 10:30:00 PM]