connectionStrings>
add name="oracleson" connectionString="Data Source=dingsenorcl;Persist Security Info=True;User ID=ds;Password=ds;Unicode=True" providerName="System.Data.OracleClient"/>
/connectionStrings>
connectionStrings>
add name="oracleson" connectionString="Data Source=dingsenorcl;Persist Security Info=True;User ID=ds;Password=ds;Unicode=True" providerName="System.Data.OracleClient"/>
/connectionStrings>
string orclcon = ConfigurationManager.ConnectionStrings["oracleson"].ConnectionString;
string orclcon = ConfigurationManager.ConnectionStrings["oracleson"].ConnectionString;
OracleConnection conn = new OracleConnection(orclcon)
OracleConnection conn = new OracleConnection(orclcon)
OracleCommand cmd = conn.CreateCommand()
OracleCommand cmd = conn.CreateCommand()打開(kāi)連接
cmd.CommandText = "insert into T_12(AAAA)values(:a)";
cmd.Parameters.AddWithValue(":a", TextBox1.Text); //參數(shù)替換oracle數(shù)據(jù)庫(kù)要用: sqlserver數(shù)據(jù)庫(kù)是@
cmd.ExecuteNonQuery();
cmd.CommandText = "insert into T_12(AAAA)values(:a)";
cmd.Parameters.AddWithValue(":a", TextBox1.Text); //參數(shù)替換oracle數(shù)據(jù)庫(kù)要用: sqlserver數(shù)據(jù)庫(kù)是@
cmd.ExecuteNonQuery();