zoukankan      html  css  js  c++  java
  • 【Vegas原创】Procedure经典用法~(需配合DBAccess类)

     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

            }
  • 相关阅读:
    POJ 3140 Contestants Division (树dp)
    POJ 3107 Godfather (树重心)
    POJ 1655 Balancing Act (树的重心)
    HDU 3534 Tree (经典树形dp)
    HDU 1561 The more, The Better (树形dp)
    HDU 1011 Starship Troopers (树dp)
    Light oj 1085
    Light oj 1013
    Light oj 1134
    FZU 2224 An exciting GCD problem(GCD种类预处理+树状数组维护)同hdu5869
  • 原文地址:https://www.cnblogs.com/amadeuslee/p/3744630.html
Copyright © 2011-2022 走看看