hi ..
I use visual basic 6, I opened a new project, when I create a data report using Crystal Report 8.5 which already include the current Visual Basic will add a new report by way of Add -> Crystal report 8.5, the error message "Visual Basic has stopped working ", if continued for an additional debug error message" an unhandled win32 exception occured in Vb6.EXE [4784], an unhandled exception at 0x89067542 in VB6.EXE: 0x0000005: Access violation reading location 0x89067542 "

I've checked the ODBC connection is no problem, please help.

thanks in advance

Dani AI

Generated

Nice catch by . What you hit is a classic VB6 + Crystal Reports 8.5 designer crash on post-XP Windows: old 32-bit COM components plus UAC and newer system controls can throw access violations when the CR designer loads. Since compatibility mode fixed it, here are a few follow-ups to keep your setup stable and to address ’s permissions point:

  • Keep your VB6 projects and report files under a writable folder (e.g., Documents), not under Program Files or the drive root.
  • If you are on a 64-bit OS, create/verify DSNs with the 32-bit ODBC tool at:
    C:\Windows\SysWOW64\odbcad32.exe
    Crystal 8.5 and VB6 are 32-bit and will not see 64-bit DSNs.
  • Re-register the Crystal runtime and common VB6 controls from an elevated command prompt. Adjust paths if your installation differs.
:: On 64-bit Windows
%SystemRoot%\SysWOW64\regsvr32 "%CommonProgramFiles(x86)%\Crystal Decisions\2.0\bin\craxdrt.dll"
%SystemRoot%\SysWOW64\regsvr32 "%SystemRoot%\SysWOW64\crviewer.dll"
%SystemRoot%\SysWOW64\regsvr32 "%SystemRoot%\SysWOW64\MSCOMCTL.OCX"

:: On 32-bit Windows
%SystemRoot%\System32\regsvr32 "%CommonProgramFiles%\Crystal Decisions\2.0\bin\craxdrt.dll"
%SystemRoot%\System32\regsvr32 "%SystemRoot%\System32\crviewer.dll"
%SystemRoot%\System32\regsvr32 "%SystemRoot%\System32\MSCOMCTL.OCX"
  • Avoid mixing Crystal versions. A stray, older crpe32.dll or other CR DLLs elsewhere on PATH (System32, app folders) can crash the CR designer inside VB6. Keep one 8.5 runtime set and remove duplicates.
  • Still unstable? Temporarily exclude VB6.EXE from DEP to test, then re-enable for security once you have identified the offending DLL.

For long-term sanity, consider a 32-bit VM (XP SP3 or Win7 32-bit) dedicated to VB6 + CR 8.5 work. It isolates the legacy stack and avoids fights with modern Windows.

Recommended Answers

All 6 Replies

2 things come to mind, corrupt hard drive or corrupt RAM.

Ithink the part of creating a new report from CR is looking for files/want to save to files where you do not have access to.

Which windows OS are you using? Do you have admin rights on that pc?

@tinstaaf - Mr Tinstaaf, some time ago I had to replace the RAM,
I have also tried to uninstall and reinstall VB6 and I also have to try
to replace the hard drive but the result is still the same,
but I will try to change to another new hard drive.
I thank you in advance for your attention

- Mr. Andre I logged in as administrator,
also I have tried to right click and run as administrator VB6 run time,
but the result remains the same, also i have tried to repair my hard drive
but still the same hard drive regenerator feared VB6.EXE stored on bad sectors,
thanks you for your close attention next time maybe you have another solution
I wait for the answer.

best regards

Also if you're using an OS newer than XP that may be your problem. Try running it in XP compatibility mode.

- It's work, thanks for your help
best regards

Please mark as solved, thanx.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.