string sql = “select * from 表名”;
OracleConnection conn = new OracleConnection(“data source=数据库名;user id=用户名;password=密码”);
conn.Open();
OracleCommand cmd = new OracleCommand(sql, conn);
cmd.CommandTimeout = 300;
OracleDataAdapter sda = new OracleDataAdapter();
sda.SelectCommand = cmd;
DataTable dt = new DataTable();
sda.Fill(dt);
conn.Close();

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐