Crystal Reports and DOA cause App Error

FisherCoB

Member
I've been dealing with "Crystal Solutions" debugging a problem running Crystal Reports on W2K machines.

I use DOA/Delphi 5 to connect to Oracle and ODBC to connect Crystal Reports to Oracle from within the same application.

From the error I'm receiving their support types gave me the following solution:

"When using the Oracle Call Interface (OCI) to make a connection to an Oracle 8 database, the Oracle "opinit()" function must be called before any other OCI function call is made. Once this function call was added to the application, the application was able to establish its own connection and perform standard database interaction and launch reports at the same time."

The full article is at http://support.crystaldecisions.net/library/kbase/articles/c2004148.asp

My question is, is DOA making the opinit call? And if not, can I make it, or must it be added to DOA?
 
Are you using SQL*Net or Net8? What exactly goes wrong?

------------------
Marco Kalter
Allround Automations
 
We run Oracle 8.1.7. I believe we run SQL*Net, but the Net8 Assistant was used to configure the tnsNames file.

What happens is that when the Crystal Report function execute/print/show is called, the function works, but there is an application error when the program ends.

Debugging shows the error occurs when the tDataModule that contains the OracleSession is freed.

At this point I'm just trying to discover if the "Crystal Decisions" folks might be right about the "opinit" call.

The error list is:
1: The instruction as "0x77f83a33" referenced memory at "0x00000010".
The memory could not be read.
2: Exception EAccessViolation in module ntdll.dll at 00003A33.
Access violation at address 77F83A33 in module 'ntdll.dll'.
Read of address 00000010.
3: Access violation at address 772E111B. Read of address 772E111B.
4: Access violation at address 772E111B. Read of address 772E111B.
5: The exception unknown software exception (0x0eedfade) occurred in the
application at location 0x77e8f142.
6: The instruction as "0x004a44bf" referenced memory at "0x015ab040".
The memory could not be read.
7: Runtime error 216 at 000A44BF
 
Crystal Reports and Direct Oracle Access must use the same SQL*Net or Net8 DLL, and must use it in the same OCI mode (OCI7 or OCI8). I'm not sure how this works for Crystal Reports. For Direct Oracle Access you can set the OracleHomeName and/or OCIDLL variables (see OracleCI unit documentation). The OCI mode can be controlled through the TOracleSession.Preferences.UseOCI7 property.

If these things do not match, then you can probably get the errors you described. The same problems can happen when you mix BDE and Direct Oracle Access components in a single application.

------------------
Marco Kalter
Allround Automations
 
Back
Top