网站开发程序员需要会的技能,做网站的销售,wordpress首页打开变慢,网站开发文本#xfeff;#xfeff;Oracle中存取4000字节以上大文本类型可以用此数据类型#xff0c;其在C#中的读写方法如下#xff1a;注意需要引用 System.Data.OracleClient然后添加命名空间#xff1a;using System.Data.OracleClientORALCE建库脚本#xff1a;CREATE TABLE TE…Oracle中存取4000字节以上大文本类型可以用此数据类型其在C#中的读写方法如下注意需要引用 System.Data.OracleClient然后添加命名空间using System.Data.OracleClientORALCE建库脚本CREATE TABLE TEST(AGREEMENT_ID CHAR(3) NOT NULL,AGREEMENT_CONTENT LONG NULL)插入数据PRotected void Button1_Click(object sender, EventArgs e){OracleConnection conn new OracleConnection(PassWordXXXXXX;User IDhk;Data Sourcewealth;Persist Security InfoTrue);conn.Open();OracleCommand cmd new OracleCommand(Select * From TEST, conn);string sql Insert Into TEST (AGREEMENT_ID, AGREEMENT_CONTENT) Values(:P_ID, :P_Value);cmd.CommandText sql;cmd.Parameters.Add(P_ID, this.TextBox2.Text);cmd.Parameters.Add(P_Value, this.TextBox1.Text);cmd.ExecuteNonQuery();conn.Close();}读取数据protected void Button2_Click(object sender, EventArgs e){OracleConnection conn new OracleConnection(PasswordXXXXXX;User IDhk;Data Sourcewealth;Persist Security InfoTrue);conn.Open();string sql Select * From TEST where AGREEMENT_ID :P_ID;OracleDataAdapter da new OracleDataAdapter(sql, conn);da.SelectCommand.Parameters.Add(P_ID, this.TextBox2.Text);DataSet ds new DataSet();da.Fill(ds);this.TextBox1.Text ds.Tables[0].Rows.Count.ToString();this.TextBox1.Text ds.Tables[0].Rows[0][AGREEMENT_CONTENT].ToString();conn.Close();}资料引用:http://www.knowsky.com/343612.html