【Vegas原创】Procedure经典用法~(需配合DBAccess类)

2年前 (2022) 程序员胖胖胖虎阿
329 0 0
 void bind()  
        {
             
            
string d = "";
            
string p = "%";
            
string strText = "";
            
//绑定table1
            for (int j = 1; j <= 4; j++)
            {
                
for (int i = 3; i >= 1; i--)
                {
                    
if (j == 1) d = "D000";
                    
else if (j == 2) d = "M000";
                    
else if (j == 3) d = "P000";
                    
else if (j == 4) d = "T000";
            
try
                    {
                        
//连接数据库,并插入数据
                        SqlParameter[] sqlParam = new SqlParameter[2];

                        sqlParam[0= new SqlParameter("@i", SqlDbType.Int, 20, ParameterDirection.Input, false00"@i", DataRowVersion.Default, i);
                        sqlParam[
1= new SqlParameter("@j", SqlDbType.NVarChar, 20, ParameterDirection.Input, false00"@j", DataRowVersion.Default, d);

                        DataSet ds = db.GetDataSet("pms_potential", sqlParam);
                   
                        strText 
= ds.Tables[0].Rows[0][0].ToString() + "%";
                    }
                    
catch
                    {
                        strText 
= "ERROR";
                    }
                   
                                    }
}

            }

            //绑定table2

        }

 

相关文章

暂无评论

暂无评论...