日期:2014-05-17 浏览次数:20450 次
CREATE PROCEDURE dbo.[cx_csmenu]
@cid bigint,
@curl varchar(500) output
AS
set @curl=(SELECT [csmenuimgurl] FROM [csmenu] WHERE [csmenuid ]=@cid)
return @curl
GO
metacn.Open();
SqlCommand matcom = new SqlCommand("cx_csmenu", metacn);
matcom.CommandType = CommandType.StoredProcedure;
SqlParameter msp = matcom.Parameters.AddWithValue("@cid",SqlDbType.BigInt);
msp.Value = 1;
msp = matcom.Parameters.Add("@curl", SqlDbType.VarChar, 500);
msp.Direction = ParameterDirection.Output;
SqlDataAdapter metada = new SqlDataAdapter(matcom);
DataSet metads = new DataSet("metads");
metada.Fill(metads, "meta");
this.lab1.Text = matcom.Parameters["@curl"].Value.ToString();
matcom.Dispose();
metada.Dispose();
metads.Dispose();