网上书店系统的设计与实现(一)(6)
作者:佚名; 更新时间:2017-10-14

ng sRemark)
  {
   ///定义类SQLHelper
   SQLHelper.SQLHelper sqlHelper = new SQLHelper.SQLHelper();

///创建访问数据库的参数   
   SqlParameter[] paramList = {
    sqlHelper.CreateInParam("@Name",SqlDbType.VarChar,200,sName),
    sqlHelper.CreateInParam("@CategoryID",SqlDbType.Int,4,nCategoryID),
    sqlHelper.CreateInParam("@Desn",SqlDbType.VarChar,200,sDesn),
    sqlHelper.CreateInParam("@Author",SqlDbType.VarChar,200,sAuthor),
    sqlHelper.CreateInParam("@Publish",SqlDbType.VarChar,200,sPublish),
    sqlHelper.CreateInParam("@PublishDate",SqlDbType.DateTime,8,dPublishDate),
    sqlHelper.CreateInParam("@ISBN",SqlDbType.VarChar,200,sISBN),
    sqlHelper.CreateInParam("@Foreword",SqlDbType.VarChar,8000,sForeword),
    sqlHelper.CreateInParam("@List",SqlDbType.VarChar,8000,sList),
    sqlHelper.CreateInParam("@OutLine",SqlDbType.VarChar,8000,sOutLine),
    sqlHelper.CreateInParam("@BuyInDate",SqlDbType.DateTime,8,dBuyInDate),
    sqlHelper.CreateInParam("@Price",SqlDbType.Money,8,dPrice),        sqlHelper.CreateInParam("@TotalNum",SqlDbType.Int,4,nTotalNum),
     sqlHelper.CreateInParam("@Remark",SqlDbType.VarChar,8000,sRemark)
   };
   try
   {
    ///执行存储过程
    return (sqlHelper.RunProc("Pr_AddBook",paramList));
   }
   catch (Exception ex)
   {
    ///抛出执行数据库异常
    SystemError.CreateErrorLog(ex.Message);
    throw new Exception(ex.Message,ex);
   }
  }

核心期刊快速发表
Copyright@2000-2030 论文期刊网 Corporation All Rights Reserved.
《中华人民共和国信息产业部》备案号:ICP备07016076号;《公安部》备案号:33010402003207
本网站专业、正规提供职称论文发表和写作指导服务,并收录了海量免费论文和数百个经国家新闻出版总署审批过的具有国内统一CN刊号与国际标准ISSN刊号的合作期刊,供诸位正确选择和阅读参考,免费论文版权归原作者所有,谨防侵权。联系邮箱:256081@163.com