using System;
//Oracle .Net Provider
using Oracle.DataAccess.Client;
//ADO.Net
using System.Data;
namespace ConsoleApplication1
{
class Class1
{
static void Main(string[] args)
{
string strSQL = "Select empno, ename, job from emp";
//Create the connection
OracleConnection oConn = new OracleConnection("Data Source=ORCL;User ID=SCOTT;Password = TIGER");
//Create the OracleCommand object to execute the query
OracleCommand oCmd = new OracleCommand(strSQL, oConn);
//The OracledataAdapter is opened to communicate the DataSet Object
OracleDataAdapter oDa = new OracleDataAdapter(oCmd);
//Create the DataSet object this is an ADO Object
DataSet adoDs = new DataSet();
//Open the connection
oConn.Open();
//The OracleDataAdapter fill the query results into the DataSet
oDa.Fill(adoDs, "emp");
oConn.Close();
//Display the Column Names
foreach (DataColumn dc in adoDs.Tables[0].Columns)
Console.Write("{0,14}", dc.ColumnName);
Console.Write("\n");
foreach (DataColumn dc in adoDs.Tables[0].Columns)
Console.Write("{0,14}", "-----------");
Console.Write("\n");
//Display the data
foreach (DataRow dr in adoDs.Tables[0].Rows)
{
for (int i = 0; i<adoDs.Tables[0].Columns.Count; i++)
Console.Write("{0,14}", dr[i]);
Console.Write("\n");
}
}
}
}
//Oracle .Net Provider
using Oracle.DataAccess.Client;
//ADO.Net
using System.Data;
namespace ConsoleApplication1
{
class Class1
{
static void Main(string[] args)
{
string strSQL = "Select empno, ename, job from emp";
//Create the connection
OracleConnection oConn = new OracleConnection("Data Source=ORCL;User ID=SCOTT;Password = TIGER");
//Create the OracleCommand object to execute the query
OracleCommand oCmd = new OracleCommand(strSQL, oConn);
//The OracledataAdapter is opened to communicate the DataSet Object
OracleDataAdapter oDa = new OracleDataAdapter(oCmd);
//Create the DataSet object this is an ADO Object
DataSet adoDs = new DataSet();
//Open the connection
oConn.Open();
//The OracleDataAdapter fill the query results into the DataSet
oDa.Fill(adoDs, "emp");
oConn.Close();
//Display the Column Names
foreach (DataColumn dc in adoDs.Tables[0].Columns)
Console.Write("{0,14}", dc.ColumnName);
Console.Write("\n");
foreach (DataColumn dc in adoDs.Tables[0].Columns)
Console.Write("{0,14}", "-----------");
Console.Write("\n");
//Display the data
foreach (DataRow dr in adoDs.Tables[0].Rows)
{
for (int i = 0; i<adoDs.Tables[0].Columns.Count; i++)
Console.Write("{0,14}", dr[i]);
Console.Write("\n");
}
}
}
}
기업100%환급/오라클/자바/스프링/안드로이드/닷넷C#/웹퍼블리싱… | 12-27 | 1993 | ||
[채용예정교육]오라클자바개발잘하는신입뽑기2개월과정,교육전취… | 12-11 | 1459 | ||
53 | [평일주간]100%환급6건,안드로이드,자바,C#,스프링3.2,SQL,힌트/… | 03-15 | 1215 | |
52 | [주말주간]C#, ASP.NET마스터 | 01-31 | 1377 | |
51 | [평일,기업100%환급]SQL기초에서 Schema Object까지 | 01-31 | 1233 | |
50 | [평일야간]HTML5, CSS3,Ajax, jQuery마스터과정 | 01-31 | 1067 | |
49 | [평일주간,평일야간,주말]Spring,MyBatis,Hibernate개발자과정 | 01-19 | 1376 | |
48 | [평일주간,평일야간,주말]안드로이드개발자과정 | 01-11 | 1211 | |
47 | [평일야간,주말주간]JAVA,Network&JSP&Spring,MyBatis,Hibernate | 01-03 | 1709 | |
46 | 기업100%환급/오라클/자바/스프링/안드로이드/닷넷C#/웹퍼블리싱… | 12-27 | 1993 | |
45 | [기업100%환급,평일주간]자바기초에서 JDBC, Servlet/JSP까지 | 12-19 | 1478 | |
44 | 웹퍼블리싱 마스터(HTML5,CSS3,jQUERY,AJAX,JavaScript) | 12-14 | 1445 | |
43 | [채용예정교육]오라클자바개발잘하는신입뽑기2개월과정,교육전취… | 12-11 | 1459 | |
42 | [평일,기업100%환급]자바기초에서 JDBC, Servlet/JSP까지 | 12-09 | 1174 | |
41 | [평일야간]닷넷(C#,Network,ADO.NET,ASP.NET)마스터 | 12-01 | 1377 | |
40 | [기업100%환급]C#4.0,WinForm,ADO.NET프로그래밍(평일주간(단기)… | 12-01 | 1534 | |
39 | [평일야간,주말]SQL기초에서실무까지(SQL기초,PLSQL,힌트,튜닝) | 12-01 | 1035 |
댓글 없음:
댓글 쓰기