1. 程式人生 > >sqlsever 和oracle的參數

sqlsever 和oracle的參數

app div class sql pen date var ndt use

 StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into YXZY_TSDQWH(");
            strSql.Append("TSDQ_SYB,TSDQ_DQ,TSDQ_LCLB)");
            strSql.Append(" values (");
            strSql.Append("@TSDQ_SYB,@TSDQ_DQ,@TSDQ_LCLB)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
					new SqlParameter("@TSDQ_SYB", SqlDbType.VarChar,50),
					new SqlParameter("@TSDQ_DQ", SqlDbType.VarChar,50),
					new SqlParameter("@TSDQ_LCLB", SqlDbType.VarChar,50)};
            parameters[0].Value = TSDQ_SYB;
            parameters[1].Value = TSDQ_DQ;
            parameters[2].Value = TSDQ_LCLB;

  

"UPDATE M_USERS SET LAST_LOGON_DATE=SYSDATE WHERE user_code=:user_code", CommandType.Text, new OracleParameter[]{
                new OracleParameter("user_code",user_code)}

  

sqlsever 和oracle的參數