Connection not Open + Server has not yet been opened error messages 
Author Message
 Connection not Open + Server has not yet been opened error messages

When trying to run a CR8 report from VB6 which is using data from a SQL
server 7 the following errors are appearing when the .viewreport command is
run.

Seagate Crystal Reports: Database Error
ODBC error: [Microsoft][ODBC Driver Manager] Connection not open

then

Crystal Report Viewer
Server has not yet been opened.

Below is the relevant section of code.

Set Rst = cmd.Execute

Report.Database.LogOnServer "p2ssql.dll", "MYSQLServer", "MYDB", "Username",
"Password"

Report.Database.SetDataSource Rst
Report.DiscardSavedData
Report.AutoSetUnboundFieldSource crBMTName

CRViewer1.ReportSource = Report
CRViewer1.ViewReport

Report.Database.LogOffServer "MYSQLServer", "MYDB", "Username", "Password"

Report is defined as the Crystal Report Designer report.
After the cmd.execute line is run data is returned from the recordset (rst).

Why are these error messages appearing with Crystal Reports 8 even though a
connection to the database has already been made and data returned?
How can this problem of the CR8 connection to SQL 7 be fixed?



Mon, 27 Jan 2003 03:00:00 GMT  
 Connection not Open + Server has not yet been opened error messages
Look up the SetLogOnInfo method of the Table object. It will fix ya up. :)

--
Sheppe Pharis, MCSD
ActiveX/API/ASP/HTML/VBA/VBS/VB5/VB6 Developer


Quote:
> When trying to run a CR8 report from VB6 which is using data from a SQL
> server 7 the following errors are appearing when the .viewreport command
is
> run.

> Seagate Crystal Reports: Database Error
> ODBC error: [Microsoft][ODBC Driver Manager] Connection not open

> then

> Crystal Report Viewer
> Server has not yet been opened.

> Below is the relevant section of code.

> Set Rst = cmd.Execute

> Report.Database.LogOnServer "p2ssql.dll", "MYSQLServer", "MYDB",
"Username",
> "Password"

> Report.Database.SetDataSource Rst
> Report.DiscardSavedData
> Report.AutoSetUnboundFieldSource crBMTName

> CRViewer1.ReportSource = Report
> CRViewer1.ViewReport

> Report.Database.LogOffServer "MYSQLServer", "MYDB", "Username", "Password"

> Report is defined as the Crystal Report Designer report.
> After the cmd.execute line is run data is returned from the recordset
(rst).

> Why are these error messages appearing with Crystal Reports 8 even though
a
> connection to the database has already been made and data returned?
> How can this problem of the CR8 connection to SQL 7 be fixed?



Sat, 01 Feb 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Server has not yet been opened message with VB6, CRP7 and SQL-server

2. Error: Server has not yet been opened.

3. Error: server has not yet been opened

4. Error: Server not yet opened (-2147192184)

5. The server has not yet been opened error

6. Crystal 8, VB Script Server has not yet been opened Error

7. Error: "Server not yet opened"

8. Error - Server has not yet been opened

9. Server Has not yet been opened Error with Crystal Reports 7

10. SQL 2000/Server not open yet error

11. Server not yet opened error

12. "server not yet opened" error

 

 
Powered by phpBB® Forum Software