Announcements
 Crystal Reports Forum : General Information : Announcements
Message Icon Topic: Query Connection Quandary Post Reply Post New Topic
Author Message
vbwrangler
Newbie
Newbie
Avatar

Joined: 11 Aug 2009
Location: United States
Online Status: Offline
Posts: 8
Quote vbwrangler Replybullet Topic: Query Connection Quandary
    Posted: 29 Aug 2012 at 7:03am
We have a really strange situation and I thought I would reach out to a few colleagues and see if you have ever seen anything like this. At this point I am not fully convinced that this is a Crystal issue; more somehow the connection between Crystal and SQL Server. The versions: Crystal is 2011 the version of the Service on IIS is 13 and SQL Server 2008 R2; SP1. The SQL box is an Intel Xeon 3.47 GHz duel core 12 GB 64-bit O/S. Below is a description of the symptoms:
1) The error from Crystal Reports (CR) is: Failed to retrieve data from the database. Details: [Database Vendor Code: 3621 ] Failed to retrieve data from the database. Details: [Database Vendor Code: 8152 ] Failed to retrieve data from the database. Error in File Plant - Multi-Day Production Report {9B76053C-6E59-45E9-8599-AF2DB08C5116}.rpt: Failed to retrieve data from the database. Details: [Database Vendor Code: 3621 ]
2) The error only happens in Crystal Reports running a SQL Server Stored Procedure (SP)
3) We can run the SP from Microsoft SQL Server Management Studio and it runs without error
4) If the SP is dropped and created again in SQL Server, it removes the error condition from Crystal
5) If the SQL Server is restarted it will remove the error condition
6) Otherwise the error is persistent.
7) We have three reports using the same stored procedure and the error does not happen in a predictable manner from either of the three-reports.
8) Once the error occurs running one report all-three are affected.
9) The SP uses Variable Tables of which one can be somewhat large 150 fields X 20,000 records and can take about 10 seconds to produce the dataset.
10) The error first showed when the large Variable Table was used in the SP, and a couple days ago I change the final SELECT * FROM @TABLE to include OPTION (RECOMPILE) which help speed it up by 10% or so because the parameters can change how SQL runs the query. However, this change did not prevent the error.
11) The same SP is called four times to complete the four Subreports used in the CR that errors
12) The error first showed when on a SQL Server 2005 system and continues to show in the SQL Server 2008 R2 system.

Any ideas?
Thanks
vbwrangler
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 30 Aug 2012 at 3:59am
You're correct - this looks like a database issue rather than a Crystal issue.  Have you looked up the Database Vendor codes (3621 and 8152) in the SQL Server error messages?  That might give you some additional information about what the actual error is.
-Dell
IP IP Logged
vbwrangler
Newbie
Newbie
Avatar

Joined: 11 Aug 2009
Location: United States
Online Status: Offline
Posts: 8
Quote vbwrangler Replybullet Posted: 30 Aug 2012 at 5:33am

Dell,

Yes the first is not much help:

3621: "The statement has been terminated."

The second:

8152: "String or binary data would be truncated." is typically when a field potentially provides more text than the field or query variable will allow. As the message implies this is not terminal, and just truncates the data. I will look closer at this I blew it off because it is often benign.

The inconsistency of the error is the real puzzle.

Thanks for the redirection.

 
 
Thanks
vbwrangler
IP IP Logged
vbwrangler
Newbie
Newbie
Avatar

Joined: 11 Aug 2009
Location: United States
Online Status: Offline
Posts: 8
Quote vbwrangler Replybullet Posted: 30 Aug 2012 at 10:35am

Resolved: It did turn out that one of the fields was retrieving more data than expected.

Thanks Dell,

D Graham

Thanks
vbwrangler
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.078 seconds.