When I create data report use VB6 Enterprise, when I add Data Source to that form,
I'm get error message "UNHANDLED EXCEPTION AT 0X89067542 IN VB6.EXE : 0XC0000005 :
ACCESS VIOLATION READING LOCATION 0X89067542" and VB6.EXE close

What happen ???
any body can help me, thanks for advanced

Regards,
FX Eko

Dani AI

Generated

A short, practical diagnosis & recovery checklist for that VB6 crash (Unhandled exception 0xC0000005 in VB6.EXE). The 0xC0000005 code is an EXCEPTION_ACCESS_VIOLATION (the process tried to read/write memory it should not). At design time that usually means a native driver/ActiveX control or its dependencies failed inside the IDE. later confirmed an ODBC-related setup was the root cause; ’s suggestion to check file locations/permissions is also relevant when the IDE can reach a driver but not its backing files or DSN. (learn.microsoft.com)
(Microsoft: EXCEPTION_ACCESS_VIOLATION) (https://learn.microsoft.com/en-us/answers/questions/5559368/frequent-application-crashes-exception-code-0xc000)

Step-by-step checks (fast to try)

Repair steps for Data Report / IDE problems

  • The Data Report runtime is different from the designer: the runtime is msdbrptr.dll (the designer is msdbrpt.dll). The runtime and its dependent files (for example msderun.dll, msstdfmt.dll) must be present on the machine and in your installer. If the wrong file/version is registered the IDE or your EXE can crash. (jeffpar.github.io)
    (Microsoft KB: distribute msdbrptr.dll and dependencies) (https://jeffpar.github.io/kbarchive/kb/248/Q248055/)
  • If a DLL/OCX needs re-registration, use regsvr32. On 64-bit Windows use the 32-bit regsvr32 in SysWOW64 for 32-bit VB6 components. Example (run elevated):
%windir%\SysWOW64\regsvr32 "%windir%\SysWOW64\msdbrptr.dll"
%windir%\SysWOW64\regsvr32 "%windir%\SysWOW64\msdbrpt.dll"

Follow regsvr32 guidance if you get errors. (support.microsoft.com)
(Microsoft: how to use regsvr32) (https://support.microsoft.com/en-gb/topic/how-to-use-the-regsvr32-tool-and-troubleshoot-regsvr32-error-messages-a98d960a-7392-e6fe-d90a-3f4e0cb543e5)

If VB6 still dies when a report is added

  • Backup the project. Temporarily remove or move the .dsr/.dsx report files out of the project folder and reopen the project to recover. As a last resort you can open the .vbp in a text editor and remove the reference lines pointing at the Data Report designer/runtime (look for MSDBRPT/MSDBRPTR)—but only after a backup. After fixing drivers/registration, rebuild and re-add the report. (KB above shows which runtime files to include). (jeffpar.github.io)

These steps helped a lot in cases where the IDE crashes while adding a Data Source: isolate, confirm DSN/driver bitness, test with a UDL, re-register the correct Data Report runtime, and include the runtime files in your deployment.

Recommended Answers

All 3 Replies

Your database was saved in a different folder than you application installed folder (normally the case). Your app is trying to read from the database or the reposrts that is saved in a folder that you do not have permission to write or read from...

Make sure that the database is in the same folder, then use the App.Path code to connect to the database/reports in your code...

Also, if running on windows vista, 7 or 8, open the application as administartor.

AndreRet thanks for your answer, I have been check ODBC connection and that is the problem
Thanks for your advanced

Only a pleasure. 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.