数据库连接
答
一旦你downloaded the appropriate driver您引用的组件在你的项目,你可以对数据库执行SQL查询:
using (var conn = new OracleConnection(ConnectionString))
using (var command = conn.CreateCommand())
{
conn.Open();
command.CommandText = "SELECT id FROM foo;";
using (var reader = command.ExecuteReader())
{
while (reader.Read())
{
// TODO: exploit the results
}
}
}
读technical articles随行司机也可能是有用的。
这可能会给你一些提示:http://stackoverflow.com/questions/782181/connect-to-an-oracle-10g-database-with-microsoft-odbc-for-oracle – 2010-06-28 11:29:45