大家帮帮忙啊~~asp 存储过程 添加记录
存储过程为
CREATE PROCEDURE dbo.gllr
@user varchar(50) ,
@name varchar(50),
@mima varchar(50),
@Dwb_dwm varchar(40),
@Dwxb_mc varchar(40),
@zhiwu varchar(40),
@jibie varchar(4),
@jinyong varchar(4)
as
set nocount on
begin
BEGIN TRANSACTION
if @user is null return
insert into Yhb (Yhb_user,Yhb_name,Yhb_pass,Yhb_dw,Yhb_dwmc,Yhb_zw,Yhb_jb,Yhb_sfdl) values (@user,@name,@mima,@Dwb_dwm,@Dwxb_mc,@zhiwu,@jibie,@jinyong)
IF @@error=0
begin
COMMIT TRANSACTION
return 1
end
ELSE
begin
ROLLBACK TRANSACTION
return 0
end
return
end
GO
asp调用时:
Set MyComm = Server.CreateObject( "ADODB.Command ")
'Set objRs = Server.CreateObject( "ADODB.Recordset ")
with MyComm
.ActiveConnection = conn
.CommandText = "denglu "
.CommandType = 4
.Prepared = true