js代码:
$.ajax(Forguncy.ForguncyData.ForguncyRoot+'customapi/spapi/ExecuteQuery', {
method:'post', dataType:'json',
data:JSON.stringify({
ConnectionName:'dev03',
ProcedureName:'GetProductByCategory',
Parameters:{'@cid': Forguncy.Page.getCell('cid').getValue()}
})
}).done(function(data){
alert(data.length);
});
存储过程:
ALTER procedure [dbo].[GetProductName](
@id varchar(10)
)
as
begin
select * from 产品 where 产品名称=@id
end
|
|