gongyu

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

1、asp.net  +  mssql

   using  System.Data.SqlClient;

  

   string  sqlstr=@"Data Source=20131231-0936\SQLEXPRESS;Initial Catalog=czcjc;Integrated Security=True";  

   SqlConnection con=new SqlConnection(sqlstr);

   SqlCommand  cmd=new SqlCommand();

   cmd.Connection=con;

   sqlstr="select * from czcjc";

   cmd.CommandText=sqlstr;

   conn.Open();

 

   DataTable dt=new DataTable();

   SqlDataAdapter da=new SqlDataAdapter();

   da.SelectCommand=cmd;

   da.Fill(dt);

 

2、asp.net + oracle

    

  using  System.Data.OracleClient;

  

   string  orastr="Data Source=czc;User ID=system;Password=wzfsystem;Unicode=True";  

   OracleConnection con=new OracleConnection(orastr);

   OracleCommand  cmd=new OracleCommand();

   cmd.Connection=con;

   orastr="select * from czcjc";

   cmd.CommandText=orastr;

   conn.Open();

 

   DataTable dt=new DataTable();

   OracleDataAdapter da=new OracleDataAdapter(str,conn);

   //da.SelectCommand=cmd;

   da.Fill(dt);

 

3、jsp + mssql

 

 

 

4、jsp + oracle   

 

posted on 2014-07-25 20:23  gongyu  阅读(1240)  评论(0编辑  收藏  举报