제목 : 예제. ASP3.0의 ADO 컴포넌트 모방하기
글번호:
|
|
251
|
작성자:
|
|
레드플러스
|
작성일:
|
|
2004/11/07 오후 10:36:00
|
조회수:
|
|
5243
|
//ASP3.0의 ADO 컴포넌트 모방하기
using System;
using ADODB;
namespace ADODB{
public class Connection{
public void Open(string strUdl){
//Open()
}
public RecordSet Execute(string strSql){
//Exeucte()
}
public void Close(){
//Close()
}
}
#region Command 클래스
public class Command
{
public void ActiveConnection{
get{}
set{}
}
public void CommandText{
get{}
set{}
}
public void Execute(){
//
}
}
#endregion
public class RecordSet
{
public void Open(string strSql, object objCon, string strCusor, string strLock, string strOpt)
{
//Open(,,,,)
}
public void Close(){
//Close()
}
}
}
public class 네임스페이스테스트
{
public static void Main()
{
string strSql = "Select * From Basic";
//Set objCon = Server.CreateObject("ADODB.Connection")
//ADODB.Connection objCon = new ADODB.Connection();
Connection objCon = new ADODB.Connection();
objCon.Open("Provider절");
RecordSet objRs = objCon.Execute(strSql);
//
objRs.Close();
objCon.Close();
objRs = null;//Set objRs = Nothing
objCon = null;//Set objCon = Nothing
}
}