D7 errors with complex dataset command text
- From: "Keith G Hicks" <krh@xxxxxxxxxxx>
- Date: Wed, 10 May 2006 11:25:15 -0400
Can anyone tell me why this runs just fine from MS SQL 2k EM and QA (it
gives me the results I expect without any errors AND I can edit the columns
from tblCusts):
SELECT tC.*,
(SELECT CASE WHEN COUNT(*) > 0 THEN CAST(1 AS BIT) ELSE CAST(0 AS BIT) END
FROM tblProd
WHERE tblProd.CustID = tC.CustID) AS ProdPosted,
(SELECT CASE WHEN SUM(tblUsedItems.UsedItems) IS NOT NULL THEN
SUM(tblUsedItems.UsedItems) ELSE CAST(0 AS DECIMAL(8,3)) END
FROM tblUsedItems
WHERE tblUsedItems.CustID = tC.CustID) AS UsedApplied
FROM
tblCusts tC
WHERE tC.RteID = 1245 AND tC.DateOfRun = '05/01/2006'
But the same thing (changing the WHERE so it uses parameters in a
master/detail TADODataSet type of setup):
SELECT tC.*,
(SELECT CASE WHEN COUNT(*) > 0 THEN CAST(1 AS BIT) ELSE CAST(0 AS BIT) END
FROM tblProd
WHERE tblProd.CustID = tC.CustID) AS ProdPosted,
(SELECT CASE WHEN SUM(tblUsedItems.UsedItems) IS NOT NULL THEN
SUM(tblUsedItems.UsedItems) ELSE CAST(0 AS DECIMAL(8,3)) END
FROM tblUsedItems
WHERE tblUsedItems.CustID = tC.CustID) AS UsedApplied
FROM
tblCusts tC
WHERE tC.RteID = :RteID AND tC.DateOfRun = :DateOfRun
Causes various errors in the IDE? My MDAC is up to date. It even causes D7
to lock up on me when I try to set the connection object back to connected =
false. When setting the dataset object active = true I get errors like
"Access violation at address 77FCD989 in module ntdll.dll. Read of address
FFFFFFFF." Also when I try to turn my connection object to connected or not
connected (which I can normally do just fine withuot any errors) I get a
similar AV but in module msado15.dll.
I really don't think it has anything to do with my parameters in the detail
dataset or the way I'm linking it to the master dataset because the original
CommandText that I've been using for weeks has always been fine:
SELECT
tblCusts.*,
COALESCE(tblProd.ProdID/tblProd.ProdID, ISNULL(tblProd.ProdID, 0)) AS
ProdPosted
FROM
tblCusts
LEFT OUTER JOIN tblProd ON tblCusts.CustID = tblProd.CustID
WHERE RteID = :RteID AND DateOfRun = :DateOfRun
Thanks,
Keith
.
- Follow-Ups:
- Re: D7 errors with complex dataset command text
- From: Keith G Hicks
- Re: D7 errors with complex dataset command text
- From: Kevin Frevert
- Re: D7 errors with complex dataset command text
- From: Keith G Hicks
- Re: D7 errors with complex dataset command text
- Prev by Date: Re: Desperately need help! PLEASE!
- Next by Date: Re: D7 errors with complex dataset command text
- Previous by thread: open pdf document
- Next by thread: Re: D7 errors with complex dataset command text
- Index(es):
Relevant Pages
|