Click to See Complete Forum and Search --> : Oracle7.3/Crystal Report w/VB6


Flex99
January 27th, 2000, 09:22 AM
Hi,
I do not know if this is proper category, but I will try. I am currently working on a project which involves VB6,Crystal Report and ORA7.3 The problem arizes when I am trying to call Crystal Report from VB6 to connect to ORA. The DLLs which were reccomended by CR people (p2sora7.dll and pdsora7.dll) I only found one p2sora7.dll, and I cannot locate the other. If anyone knows where I can find it, I would really appreciate it.
Thanks
Felix

nsundara
January 27th, 2000, 11:15 AM
p2sora7.dll is used for 32-bit and pdsora7.dll is for 16-bit. So p2sora7.dll is sufficient for you.

What is the exact syntax you are using? And also, are you using the CR Viewer?

If you could provide more details, it would be easier to help you.

Flex99
January 27th, 2000, 01:07 PM
Thanks for you response. Here were the problem lay:
1. The only way Crystal Report can see Oracle SP is if SP has referenced Cursor. If I use standard ODBC CROR7 or any other standard drivers either I do not see this procedure or connection fails during process.
The only driver I can use is in Crystal Report shows as "Oracle Server" server type in Log On Server screen, which I assume should be in the ODBC Data Source Administrator. This is the only Driver I can use to be able to see Stored Procedure in the Oracle. Unfortunately, I do not see this server in ODBC Administrator, therefore I cannot connect Crystal Report to Oracle in the VB.

What do you think?

nsundara
January 27th, 2000, 01:45 PM
I have recently completed a project in exactly the same way you mentioned. You are right about reference cursors, stored procedures and crystal reports.It is the native driver of crystal which is actually being used i.e p2sora7.dll to connect to VB.

I used the CR Viewer in VB6. I used the following line of code to connect from VB to Crystal Reports.


Dim rpt as crwRpt

set rpt = new crwRpt

rpt.Database.Tables(1).SetLogOnInfo gServer$, ,gUserID$, gPassword$





In the above example, crwRpt is the Crystal Designer file with a .dsr extension. You can import the reports created into VB as designer files and the designer files
will be part of your executable. Therefore, you don't have to specify any path name etc. You don't have to store the reports in any directory, as they are already part of your application.

You could try downloading this .dll from Seagatesoftware.com and try registering it again. You can also contact the technical support guys via e-mail. In most cases, they reply back within a day.

We faced lots of problems like this. I wish you Good Luck! Let me tell you, Crystal Reports is very powerful, but it also complicates things a lot most of the time.

If you have any more questions, feel free to ask!

Flex99
January 28th, 2000, 10:21 AM
Thanks for your reply. I cannot agree with you more... But still we have to use it. I tried to talk to people from Seagate, and we were not connecting to each other. I was asking about direct connection and how I can get DSN created which would emulate this ("Oracle Server"), but guy was not understanding me. I also found this in help:
("This version of Seagate Crystal Reports supports direct access to Oracle 7 SQL databases. The PDSORA7.DLL translation file (installed with the program) provides this accessibility. This file can communicate with the Oracle 7 database driver ORA72WIN.DLL, which works directly with Oracle databases and clients, retrieving the data you need for your report.
The Oracle client software must be installed on your system, and the location of the ORA72WIN.DLL file must be in the PATH statement of your AUTOEXEC.BAT file.)
But I do not have ORA72WIN.DLL on my system. Are you familiar with this?

January 28th, 2000, 10:44 AM
As far as installing the Oracle Client is concerned, that's one thing I forgot to mention to you. Yes, it is necessary to have the Oracle Client installed. As far as the second question is concerned, I am not sure, but I think if you have the following line in your AUTOEXEC.BAT, it should work fine:

PATH C:\ORAWIN95\BIN; ...... (Or whatever your specific path is)

It worked fine for us that way.

January 28th, 2000, 10:47 AM
As far as installing the Oracle Client is concerned, that's one thing I forgot to mention to you. Yes, it is necessary to have the Oracle Client installed. As far as the second question is concerned, I am not sure, but I think if you have the following line in your AUTOEXEC.BAT, it should work fine:

PATH C:\ORAWIN95\BIN; ...... (Or whatever your specific path is)

It worked fine for us that way.

Sorry, I forgot to put my name in.

Flex99
February 2nd, 2000, 08:40 AM
I've Got It.I did connect. Here what I had to do:

'Using Provider instead of DSN Connection
strConnString = "Provider=MSDAORA;UID=strUIDt;PWD=strPWD;SERVER=strSRV;"
With rptMainReports ' Report Control
.ReportFileName = strFileName
.Connect = strConnString
...
.Destination = crptToWindow
.WindowState = crptMaximized
.Action = 1
End With



Also in the crystal report I used driver which is internal to CR(Oracle Server) when you are trying to connect to Dbase, and in Oracle for Stored Procedure to be accessed by CR, it should be written with reference to cursor.
This is very important for SP with parameters.