Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot find database DLL.

Status
Not open for further replies.

Flupke

Programmer
Jun 26, 2002
94
BE
In a Visual Basic program, I use the Crystal Report OCX to display my reports through the program. Recently, I installed Crystal Reports 9 on a new machine, that did not have CR 8.5 - the version I used to work with - before. The OCX was not installed and registered, so I had to do it manually.
Now I get the Run-time error '20532', Cannot find database DLL when executing crpt.Action = 1 in my Visual Basic code.

Can someone please help me how to fix this problem?

Many thanks and greetings,

Michel
 
Hi,
The error is due to missing dependency files. Look for P2smon.dll. If it is present and still you get error then
look for Msvcrt.dll and Msvcirt.dll dependency files
for P2smon.dll 7.0.100.3.


Bagavi/Bhargi
[wavey]
 
I assume you installed CR9 developer? the Std and Pro editions do not include the right DLL's.

Also CR9 installs the DLL's in a different folder. If you plan to use the CR8.5 OCX you will need to copy all the CR8.5 DLL's from Windows\Crystal.

But note the CR8.5 OCX will not run the CR9 reports you are designing. Editor and Publisher of Crystal Clear
 
"Cannot find database DLL " means Crystal reports is unable to find the database driver dll for data access. In CR8.5 the databse driver used for ADO datasource is P2smon.dll. For native SQL Server it is P2ssql.dll and its dependency dlls are p2lsql.dll and ntwdblib.dll.

For CR9 the database driver dlls are different and the reports created or converted to CR9 are not backward compatible. In CR9, the ADO database driver is Crdb_ado.dll and the native SQL Server driver is not supported, so these reports should be converted to use either odbc driver(Crdb_odbc.dll) or ado driver.

So find your appropriate database driver dll and put it in the System32 directory. You can also perform a dependency check on the dll to find any futher ones using depends.exe. Hope this helps!


cheers.
 
You wrote in a reply to my problem:

You can also perform a dependency check on the dll to find any futher ones using depends.exe.

Can you please explain to me how I can do that?

Many thanks for your kind help
 
Hi Flupke,

Depends.exe is the dependency walker, its a tool that is part of Visual Studio. Open Depends from the "Microsoft Visual Studio6.0 Tools". Then Choose File-Open and select the dll whose dependency you want to check. It will list all the dependency dlls for the dll you have selected.If your system is missing one, it will show that with a yellow icon and give its description.

Cheers,
Techi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top