Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Problems with SQL Native Client Post Reply Post New Topic
Author Message
Craigmeister
Newbie
Newbie


Joined: 03 Aug 2010
Online Status: Offline
Posts: 4
Quote Craigmeister Replybullet Topic: Problems with SQL Native Client
    Posted: 03 Aug 2010 at 7:02am
I have recently made some changes to a few tables in my MS SQL 2005 database and a particular Crystal Reports XI report with subreports is giving me trouble. The error message when I try to preview the report is:
 
Failed to retreive data from the database. Details:HY000:[Microsoft][SQL Native Client] Connection is busy with results for another command.
 
(I can preview the subreports individually with no problem).
 
I am using an ODBC datasource to specify the server/database using the SQL Native Client. When I use just a plain SQL Server ODBC datasource, It works with no errors. I understand that using the plain SQL Server ODBC datasource, obscures some of the functionality improvements that is available with SQL 2005, but not with SQL 2000.
 
Is that what is going on here? Since I modified my tables, could it be the field types added are not supported by Crystal XI or there is something I need to do to my datasource or something else in my report to allow it to work with a SQL 2005 datatype? 
IP IP Logged
Craigmeister
Newbie
Newbie


Joined: 03 Aug 2010
Online Status: Offline
Posts: 4
Quote Craigmeister Replybullet Posted: 03 Aug 2010 at 7:05am
Here is the SQL query for the main form.
 
 SELECT "person"."first_name", "person"."last_name", "person"."date_of_birth", "patient"."med_rec_nbr", "patient"."person_id"
 FROM   "NGProd"."dbo"."patient" "patient" INNER JOIN "NGProd"."dbo"."person" "person" ON ("patient"."practice_id"="person"."practice_id") AND ("patient"."person_id"="person"."person_id")
 
select top 1 md_info_.ccmd1_name ,md_info_.ccmd2_name , md_info_.ccmd3_name , md_info_.ccmd4_name , md_info_.ccmd5_name , md_info_.ccmd6_name , md_info_.ccmd7_name , md_info_.ccmd8_name , md_info_.person_id  from patient
inner join md_info_ on
patient.person_id = md_info_.person_id
inner join patient_encounter on
md_info_.enc_id = patient_encounter.enc_id
where md_info_.ccmd1_name != 'NULL' and md_info_.person_id = (select patient_idcode from nursechartsum_)
order by enc_timestamp desc
 
select top 1 md_info_.referring_md, md_info_.person_id from patient
inner join md_info_ on
patient.person_id = md_info_.person_id
inner join patient_encounter on
md_info_.enc_id = patient_encounter.enc_id
where md_info_.referring_md != 'NULL' and md_info_.person_id  = (select patient_idcode from nursechartsum_)
order by enc_timestamp desc
 
select top 1 md_info_.pcp_name, md_info_.person_id from patient
inner join md_info_ on
patient.person_id = md_info_.person_id
inner join patient_encounter on
md_info_.enc_id = patient_encounter.enc_id
where md_info_.pcp_name != 'NULL' and md_info_.person_id  = (select patient_idcode from nursechartsum_)
order by enc_timestamp desc
 
IP IP Logged
Craigmeister
Newbie
Newbie


Joined: 03 Aug 2010
Online Status: Offline
Posts: 4
Quote Craigmeister Replybullet Posted: 03 Aug 2010 at 7:11am
AS far as the changes to the tables, there are several new fields added to the person, patient, and patient_encounter tables. Other than new fields of type uniqueidentifier and char and varchar, there are also new fields of type SMALLINT. None of the new fields are returned in the query, but I am guessing with the joins, the resultant dataset, however filtered, may be causing problems.
 
If anyone has any thoughts, I would very much appreciate it.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 04 Aug 2010 at 6:18am
After you added the fields, did you "Verify Database" in the report?  One of my on-going frustrations with Crystal (since version 4.5) has been that when you add fields or indexes to a table, sometimes reports stop working - even if the fields or the index are not used in the report.
 
-Dell
IP IP Logged
Craigmeister
Newbie
Newbie


Joined: 03 Aug 2010
Online Status: Offline
Posts: 4
Quote Craigmeister Replybullet Posted: 05 Aug 2010 at 6:51am
I get the message above after clicking Database...Verify Database.
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.016 seconds.