c# 连接Oracle数据库
string sql = "select * from TSBLCS_LOTRESULT;OracleConnection conn = new OracleConnection(“data source=数据库名;user id=用户名;password=密码”);conn.Open();OracleCommand cmd = new OracleCommand(sql, conn);cmd.C
·
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();
更多推荐
已为社区贡献1条内容
所有评论(0)