已有57人关注
我的问题是以下代码是VS2005自动生成的,还是程序员手打的,如果是自动生成的,是如何生成的?
发表在C#图书答疑 2009-02-04
是否精华
版块置顶:
 //调用DataBase类中的MakeInParam方法为SqlParameter参数数组赋值
        SqlParameter[] prams ={
            data.MakeInParam("@UserId",SqlDbType.VarChar,20,UserId),
            data.MakeInParam("@UserName",SqlDbType.VarChar,100,UserName),
            data.MakeInParam("@UserPassword",SqlDbType.VarChar,50,UserPassword),
            data.MakeInParam("@UserRole",SqlDbType.VarChar,50,UserRole),
            data.MakeInParam("@UserPoint",SqlDbType.Int,4,UserPoint),
            data.MakeInParam("@UserName1",SqlDbType.VarChar,100,UserName1),
            data.MakeInParam("@UserSex",SqlDbType.Char,4,UserSex),
            data.MakeInParam("@UserAge",SqlDbType.Int,4,UserAge),
            data.MakeInParam("@UserIdCard",SqlDbType.VarChar,50,UserIdCard),
            data.MakeInParam("@UserCountry",SqlDbType.VarChar,50,UserCountry),
            data.MakeInParam("@UserProvince",SqlDbType.VarChar,50,UserProvince),
            data.MakeInParam("@UserCity",SqlDbType.VarChar,50,UserCity),
            data.MakeInParam("@UserComName",SqlDbType.VarChar,50,UserComName),
            data.MakeInParam("@UserJob",SqlDbType.VarChar,50,UserJob),
            data.MakeInParam("@UserComAdd",SqlDbType.VarChar,50,UserComAdd),
            data.MakeInParam("@UserPostcode",SqlDbType.VarChar,50,UserPostcode),
            data.MakeInParam("@UserFax",SqlDbType.VarChar,50,UserFax),
            data.MakeInParam("@UserTelephone",SqlDbType.VarChar,50,UserTelephone),
            data.MakeInParam("@UserMobile",SqlDbType.VarChar,50,UserMobile),
            data.MakeInParam("@UserEmail",SqlDbType.VarChar,50,UserEmail),
            data.MakeInParam("@UserMsn",SqlDbType.VarChar,50,UserMsn),
            data.MakeInParam("@UserRegisterTime",SqlDbType.DateTime,8,UserRegisterTime),
            data.MakeInParam("@UserRemark",SqlDbType.VarChar,100,UserRemark),
        };
        //调用DataBase类中的RunProc方法执行insert语句,并返回执行结果
        return(data.RunPro("INSERT INTO tb_User(UserId,UserName,UserPassword,UserRole,UserPoint,UserName1,UserSex,UserAge,UserIdCard,UserCountry,UserProvince,UserCity,UserComName,UserJob,UserComAdd,UserPostcode,UserFax,UserTelephone,UserMobile,UserEmail,UserMsn,UserRegisterTime,UserRemark)"
            +"VALUES(@UserId,@UserName,@UserPassword,@UserRole,@UserPoint,@UserName1,@UserSex,@UserAge,@UserIdCard,@UserCountry,@UserProvince,@UserCity,@UserComName,@UserJob,@UserComAdd,@UserPostcode,@UserFax,@UserTelephone,@UserMobile,@UserEmail,@UserMsn,@UserRegisterTime,@UserRemark)",prams));
    }
分享到:
精彩评论 1
小科_mrkj
学分:43 LV2
2009-02-06
沙发
读者朋友:
    您好,以上方法是自定义的方法,是自己手动编写的。
首页上一页 1 下一页尾页 1 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照