首页上一页 1  下一页尾页 1 条记录 1/1页
        asp.net 项目开发全程实录 第一章 Operation.cs
                 	
                        发表在ASP.NET图书答疑
                        2010-05-28                                                
                    		
                                                                            	
                        
                        
                    
                    
                    	是否精华
                    	是
                    	否
                    
                    
                    
                            版块置顶:
                            是
                            否
                        
                    
                                            所传入的参数为什么先存入SqlParameter数据中再使用呢,直接使用不行吗
public void InsertInfo(string type, string title, string info, string linkMan, string tel)
{
SqlParameter[] parms ={
data.MakeInParam("@type",SqlDbType.VarChar,50,type),
data.MakeInParam("@title",SqlDbType.VarChar,50,title),
data.MakeInParam("@info",SqlDbType.VarChar,500,info),
data.MakeInParam("@linkMan",SqlDbType.VarChar,50,linkMan),
data.MakeInParam("@tel",SqlDbType.VarChar,50,tel),
};
int i = data.RunProc("INSERT INTO tb_info (type, title, info, linkman, tel) VALUES (@type, @title,@info,@linkMan, @tel)", parms);
}
                
        	
        
        
    public void InsertInfo(string type, string title, string info, string linkMan, string tel)
{
SqlParameter[] parms ={
data.MakeInParam("@type",SqlDbType.VarChar,50,type),
data.MakeInParam("@title",SqlDbType.VarChar,50,title),
data.MakeInParam("@info",SqlDbType.VarChar,500,info),
data.MakeInParam("@linkMan",SqlDbType.VarChar,50,linkMan),
data.MakeInParam("@tel",SqlDbType.VarChar,50,tel),
};
int i = data.RunProc("INSERT INTO tb_info (type, title, info, linkman, tel) VALUES (@type, @title,@info,@linkMan, @tel)", parms);
}

 
	
                                                 VIP会员
VIP会员 购物车
购物车

 私信
                         私信 
                     发表新帖
发表新帖 立即签到
立即签到 
        		  
        		 
         		 关注
关注
                  回复
 回复 支持(
                	支持( 反对(
                    反对( 
                







 
                     
                     
					 
						 
						 
						 
						