Link to home
Start Free TrialLog in
Avatar of Spareyarn
Spareyarn

asked on

Server has not yet been opened, ASP

Hi,
I've seen many responses to this question, but none seem to solve my problem.

I installed the little CR test kit aspxmps85.exe from a previous post and got the "Begin Here" example to work fine.  The "Begin Here" report logs onto a ODBC-mdb Xtreme Sample Database and has a few columns.  Very simple report, setup IIS and it works just dandy.

I modified the report and Remove/Added a different database (Xtreme Sample Database 2003) to the report.  Used the same exact columns and the database is also an ODBC-mdb.  I get the error message "Server has not yet been opened".

I tried the simplest form of modification to get rid of this god forsaken error message because I'm trying to display a native oracle driver CR report from asp and always got that message.

I've looked at all the ASP code in the "AlwaysRequired" and "MoreRequired" asp pages for a hardcoded DSN connection string, to no avail.  I assume the CRXA???.dll just looks for the correct dll the CR report was originally developed in.

Already copied all the DLL's to winnt/system and the virtual directory from winnt/crystal.  The report runs fine from CR developer.  Is there any really stupid reasons you could get this error message, a mistake an abused malnurited monkey might make?  If so, it's probably what i'm doing wrong.  

Thanks.
Avatar of Spareyarn
Spareyarn

ASKER

OH yeah,
I'm a complete newbie concerning the Crystal/ASP marriage.  CR 8.5 Developer, IIS 5.1, WinXP PRO
Avatar of Mike McCracken
What version of Oracle?  
If it is 9i you must use Oracle's ODBC driver

http://support.businessobjects.com/library/kbase/articles/c2009948.asp

mlmcc
I will be using Oracle 9.2.0.1.0, but for now I'm just using that ODBC-mdb database connection.

I'm not very clear as to how the ASP architecture works.. On some samples, I see that you have to create a Database connection object whether thru ADO, OLEDB..whatever.   However, this ODBC-mdb ASP tutorial makes no database connection objects in the ASP code.  It just creates a report object oApp or something like that , then opens the file.  I'd rather have it work that way, no special database connection hardcoding in the ASP, just give it the RPT filename and viola, it loads up.

Is there a very simple way of just loading up an ODBC CR report via ASP and it working?

Also, are you saying I can't use native oracle drivers within an ASP CR page? All of my reports are native oracle.

Thanks.  
The 9i comment you linked to is just CR Supported drivers for XP.  I use native oracle on XP and so do all my clients and no problems.  
I swear by all things Holy this post will not die willingly on the 21 day limit roadside.
Since you have the aspxmps85 samples, have a look at the 'SimpleSetLogonInfo' sample, particularly the usage of the SetLogonInfo method in 'SimpleSetLogonInfo.asp'.  You won't be able to actually run the sample unless you've got SQL Server installed (and the 'pubs' database), but the concept of passing logon credentials to a report is illustrated fairly well.

When running a report against a true SQL-based data source, you must pass logon information.  You can get skirt that with SQL Server by using Windows Authentication.  Not being an Oracle user, I don't know how you'd get around the necessity of passing login credentials.

-dave
I have looked at that code and it seems fairly straightforward.  I used to have SQL Server on my machine, but something wrong with my new MDAC I needed for something else, use SQL Server mainly for cubes.   More importantly, I will absolutely have to code a Database Connection Object into the ASP if my report is Oracle based?
As far as I know, MUST supply the login information for Oracle.

-dave
First things first: if you write a report, you cannot change the driver type at runtime.
This means that if you write a report using ODBC, you'll still have to use an ODBC connection at runtime.  This connection might well point at a totally different database platform, but from the report's perspective it still has to be an ODBC connection, and you cannot change it from ODBC to, say, native Oracle.  If you know that the end product will use a native driver, then use a native driver to build the report in the first place.

Secondly, a database connection object in the sense of an mdac-type connection using ADO is not necessary, unless you're using the active data driver, through which you can report off a dynamic, memory-resident recordset.  The suggestion already given about using the SetLogonInfo method of the Table class is presumably the best way to move forward in your case.

Good luck
Thanks for the comment Saari,
Do I also need to incorporate the "Show SQL" SQL query from the CR report into the ASP somewhere?
Lastly, If the database is native Oracle and I want to use ActiveX, I have to use create an ADO object?

Sorry, very ignorant on this subject.  If anyone has a small code snippet of a native Oracle Connection object from ADO in ASP, that would be super too.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Saari_Lex
Saari_Lex
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm interested :-)