Created
October 31, 2013 12:23
-
-
Save kiyokura/7248793 to your computer and use it in GitHub Desktop.
ODP.NETでGlimpse.Ado NGのパターン
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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