cancel
Showing results for 
Search instead for 
Did you mean: 

Database Connection Error: Cannot obtain error message from the server

Former Member
0 Kudos

I have a SQL statement that wants to add a temp table to the database. The SQL statement works fine but when I try to add it via 'Add Command' feature in Crystal XI R2, I get the following error message:

Database Connection Error: Cannot obtain error message from the server

Any ideas?

Thanks in advance,

Zack H.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Can you try creating a stored procedure with the query and adding this to the report? also can you paste the query here?

Regards,

Raghavendra

Edited by: Raghavendra Gadhamsetty on Jun 5, 2009 11:49 PM

Former Member
0 Kudos

Hi Raghavendra,

I am using this in the 'Add Command' feature but I get the error message displayed in the subject line:


CREATE TABLE #TibetanYaks(
YakID char(4),
YakName char(20) )

INSERT INTO #TibetanYaks (YakID, YakName)
SELECT  LastName, FirstName
FROM 	Employee
WHERE 	EmployeeID between '2000' and '3000'

I haven't tried to add this as a stored procedure but I imagine it will work as I have no problems yet with stored procedures. I simply want to be able to use temporary tables for the sole purpose of that session and not creating anything static in the database.

By the way, even though I get the error message, when I look on the backend database, I see that the temporary table was successfully created...its just not brought across correctly in Crystal.

Any ideas?

Zack H.

Former Member
0 Kudos

Just following up on this thread.

Any ideas how to successfully bring a temp table to the database expert?

Regards,

Zack H

Former Member
0 Kudos

Any updates on this thread?

Answers (2)

Answers (2)

Former Member
0 Kudos

It works now.

I had to change my sql statement as follows:

SELECT LastName, FirstName INTO #TibetanYaks

FROM Employee

WHERE EmployeeID between '2000' and '3000'

SELECT *

FROM #TibetanYaks

DROP TABLE #TibetanYaks

Former Member
0 Kudos

Crystal probably can't see the table because of the owner of the table. You can usually get around this by setting the quallified table name but you can't do this in Crystal under set database location.

When creating the table try create the table with a owner that is accessible by everyone. For example in MSSQL dbo would be an owner that everyone can see.

Former Member
0 Kudos

Zilla,

I tried to create a new database connection using the SA credentials.

I still get the same error message.

I know it is a user rights issue within Crystal because I do see the temp table created successfully on the db side.

Why is it not allowing me to see the temp table in Crystal? How can I overcome this issue?

Thanks,

Zack H.