Skip to content

Instantly share code, notes, and snippets.

@kiyokura
Created October 31, 2013 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiyokura/7248793 to your computer and use it in GitHub Desktop.
Save kiyokura/7248793 to your computer and use it in GitHub Desktop.
ODP.NETでGlimpse.Ado NGのパターン
// Glimpse.Ado NGのパターン
using (System.Data.Common.DbConnection cnOrg = new Oracle.DataAccess.Client.OracleConnection("接続文字列"))
{
using (var cn = new Glimpse.Ado.AlternateType.GlimpseDbConnection(cnOrg))
{
cn.Open();
var cmd = cn.CreateCommand();
cmd.CommandText = "select * from hoge";
using (var dr = cmd.ExecuteReader())
{
while (dr.Read())
{
Debug.WriteLine("debug:{0}", dr[0]);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment