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 | 2163 | ||
[채용예정교육]오라클자바개발잘하는신입뽑기2개월과정,교육전취… | 12-11 | 1562 | ||
53 | [평일주간]100%환급,안드로이드,자바,C#,스프링3.2,SQL,힌트/튜… | 03-15 | 1351 | |
52 | [주말]C#,ASP.NET마스터 | 01-31 | 1468 | |
51 | [기업100%환급,평일주간]SQL기초에서스키마오브젝트,PLSQL,힌트… | 01-31 | 1543 | |
50 | [기업100%환급]Spring ,MyBatis,Hibernate실무과정(스프링개발자… | 01-31 | 1172 | |
49 | [평일주간,평일야간,주말]Spring,MyBatis,Hibernate개발자과정 | 01-19 | 1474 | |
48 | [평일주간,평일야간,주말]안드로이드개발자과정 | 01-11 | 1298 | |
47 | [주말주간,주말야간]JAVA,Network&JSP&Spring,MyBatis,Hibernate | 01-03 | 1803 | |
46 | 기업100%환급/오라클/자바/스프링/안드로이드/닷넷C#/웹퍼블리싱… | 12-27 | 2163 | |
45 | [기업100%환급]자바웹개발기초과정(JAVA,JDBC,JSP,Servlet,Aajx,… | 12-19 | 1564 | |
44 | [평일야간, 주말]웹퍼블리싱 마스터(HTML5,CSS3,jQUERY,AJAX,Jav… | 12-14 | 1543 | |
43 | [채용예정교육]오라클자바개발잘하는신입뽑기2개월과정,교육전취… | 12-11 | 1562 | |
42 | [주말, 평일야간]자바기초에서JSP,Ajax,jQuery,Spring3.2,MyBati… | 12-09 | 1251 | |
41 | [평일야간]닷넷(C#,Network,ADO.NET,ASP.NET)마스터 | 12-01 | 1473 | |
40 | [기업100%환급]자바기초&안드로이드개발자과정(Android전액환급… | 12-01 | 1609 | |
39 | [평일야간,주말]SQL기초에서실무까지(SQL기초,PLSQL,힌트,튜닝) | 12-01 | 1121 |
댓글 없음:
댓글 쓰기