B
Bernd Schneider
Hi Experts,
I would like to use the sp "sp_routeStat_CTY_Total_TestForm" as data
source for the form "Ufo_Test" with the input paramter "@LAND".
But after I did so, all controls of the form desappeared during run
time.
The sp delivers a ranking of flight destinations. @LAND should limit
the result to one single country (filed CC in the tables):
data source of form properties: sp_routeStat_CTY_Total_TestForm
import parameter of form properties (T_CC is a text field):
@LAND nvarchar(2) = forms!Ufo_Test!T_CC
The sp works fine if I enter the parameter manually.
I'm using MS SQL 2000, Access 2002 project (ADP). Both libraries ADO
and DAO are enabled, but I don't want to use a recordset. I need to
solve this without VBA.
This is the stored procedure:
CREATE PROCEDURE dbo.sp_routeStat_CTY_Total_TestForm(@LAND
nvarchar(2))
AS SELECT dbo.T_Route_St_CTY.CTY, dbo.T_Route_St_CTY.CITY,
dbo.T_Route_St_CTY.CC, COUNT(dbo.T_cum_TICKET.TICKETNR) AS Tickets,
SUM(dbo.T_cum_TICKET.Remittance_TOT) AS TOTAL,
SUM(dbo.T_cum_TICKET.Fare_TOT) AS FARE
FROM dbo.T_Route_St_CTY INNER JOIN
dbo.T_Route_St_APT ON dbo.T_Route_St_CTY.CTY =
dbo.T_Route_St_APT.CTY INNER JOIN
dbo.T_cum_TICKET INNER JOIN
dbo.T_Routing ON dbo.T_cum_TICKET.TICKETNR =
dbo.T_Routing.TICKETNR ON dbo.T_Route_St_APT.APT =
dbo.T_Routing.DEST_AIRP
WHERE (dbo.T_cum_TICKET.REMITTANCE_PERIOD_ENDING_DATE BETWEEN
CONVERT(DATETIME, '2005-01-01 00:00:00', 102) AND CONVERT(DATETIME,
'2005-06-30 00:00:00', 102))
GROUP BY dbo.T_Route_St_CTY.CTY, dbo.T_Route_St_CTY.CITY,
dbo.T_Route_St_CTY.CC
HAVING (dbo.T_Route_St_CTY.CC = @LAND)
ORDER BY COUNT(dbo.T_cum_TICKET.TICKETNR) DESC
GO
Any advice would be appreciated.
Thanks in advance
Bernd
I would like to use the sp "sp_routeStat_CTY_Total_TestForm" as data
source for the form "Ufo_Test" with the input paramter "@LAND".
But after I did so, all controls of the form desappeared during run
time.
The sp delivers a ranking of flight destinations. @LAND should limit
the result to one single country (filed CC in the tables):
data source of form properties: sp_routeStat_CTY_Total_TestForm
import parameter of form properties (T_CC is a text field):
@LAND nvarchar(2) = forms!Ufo_Test!T_CC
The sp works fine if I enter the parameter manually.
I'm using MS SQL 2000, Access 2002 project (ADP). Both libraries ADO
and DAO are enabled, but I don't want to use a recordset. I need to
solve this without VBA.
This is the stored procedure:
CREATE PROCEDURE dbo.sp_routeStat_CTY_Total_TestForm(@LAND
nvarchar(2))
AS SELECT dbo.T_Route_St_CTY.CTY, dbo.T_Route_St_CTY.CITY,
dbo.T_Route_St_CTY.CC, COUNT(dbo.T_cum_TICKET.TICKETNR) AS Tickets,
SUM(dbo.T_cum_TICKET.Remittance_TOT) AS TOTAL,
SUM(dbo.T_cum_TICKET.Fare_TOT) AS FARE
FROM dbo.T_Route_St_CTY INNER JOIN
dbo.T_Route_St_APT ON dbo.T_Route_St_CTY.CTY =
dbo.T_Route_St_APT.CTY INNER JOIN
dbo.T_cum_TICKET INNER JOIN
dbo.T_Routing ON dbo.T_cum_TICKET.TICKETNR =
dbo.T_Routing.TICKETNR ON dbo.T_Route_St_APT.APT =
dbo.T_Routing.DEST_AIRP
WHERE (dbo.T_cum_TICKET.REMITTANCE_PERIOD_ENDING_DATE BETWEEN
CONVERT(DATETIME, '2005-01-01 00:00:00', 102) AND CONVERT(DATETIME,
'2005-06-30 00:00:00', 102))
GROUP BY dbo.T_Route_St_CTY.CTY, dbo.T_Route_St_CTY.CITY,
dbo.T_Route_St_CTY.CC
HAVING (dbo.T_Route_St_CTY.CC = @LAND)
ORDER BY COUNT(dbo.T_cum_TICKET.TICKETNR) DESC
GO
Any advice would be appreciated.
Thanks in advance
Bernd