N
nzfsoft
Unregistered / Unconfirmed
GUEST, unregistred user!
我在数据库中定义了一个存储过程;
如:
/*检索表中数据 */
CREATE PROCEDURE SelectGoods
@TabName varchar(200) , /*行包表名*/
@ItmTabName varchar(20), /* 行包详细表名*/
@Mysymbol varchar(3)='%', /*关键字一*/
@Myno varchar(32), /*关键字二*/
@MyStartStationName varchar(10)='%', /*关键字三*/
@site_code varchar(4)='%' /*库位号*/
AS
declare @MySql varchar(200)
set @MySql='select A.Symbol, A.No, A.StartStationName, A.Site, A.Piece, A.Weight, A1.GoodsNo, A1.GoodsName from '+@TabName
+' as A INNER JOIN '+@ItmTabName
+' as A1 ON A.Symbol=A1.Symbol AND A.No=A1.No AND A.StartStationName=A1.StartStationName where A.site ='
+@site_code+' and a.symbol='+@Mysymbol +' and a.no='+@Myno +' and a. StartStationName='+@MyStartStationName
+'order by A.Symbol, A.No, A.StartStationName '
Exec(@MySql)
/*我如何知道这个存储过程执行后的记录总数*/
/*我用ADOstoreproc.recordset.recount不可以获取记录总数*/
GO
------------------------------------------
如:
/*检索表中数据 */
CREATE PROCEDURE SelectGoods
@TabName varchar(200) , /*行包表名*/
@ItmTabName varchar(20), /* 行包详细表名*/
@Mysymbol varchar(3)='%', /*关键字一*/
@Myno varchar(32), /*关键字二*/
@MyStartStationName varchar(10)='%', /*关键字三*/
@site_code varchar(4)='%' /*库位号*/
AS
declare @MySql varchar(200)
set @MySql='select A.Symbol, A.No, A.StartStationName, A.Site, A.Piece, A.Weight, A1.GoodsNo, A1.GoodsName from '+@TabName
+' as A INNER JOIN '+@ItmTabName
+' as A1 ON A.Symbol=A1.Symbol AND A.No=A1.No AND A.StartStationName=A1.StartStationName where A.site ='
+@site_code+' and a.symbol='+@Mysymbol +' and a.no='+@Myno +' and a. StartStationName='+@MyStartStationName
+'order by A.Symbol, A.No, A.StartStationName '
Exec(@MySql)
/*我如何知道这个存储过程执行后的记录总数*/
/*我用ADOstoreproc.recordset.recount不可以获取记录总数*/
GO
------------------------------------------