日期:2014-05-16 浏览次数:20845 次
private void button3_Click(object sender, EventArgs e)
{
string conn_str = "provider=OraOLEDB.Oracle;data source=ECGT;User Id=sa;Password=Orcal123456;";
OleDbConnection cn = new OleDbConnection(conn_str);
cn.Open();
try
{
string sql = " CREATE OR REPLACE FORCE VIEW \"V_test\" AS SELECT PATID,Sex FROM test ";
OleDbCommand cmd1 = new OleDbCommand(sql, cn);
cmd1.ExecuteNonQuery();
}
catch (Exception e1)
{
}
finally
{
cn.Close();
}
}