on 06-05-2009 10:29 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.