????? ??????? ?????? ????? ADO ?? Oracle ??? ??????? ???? ?????? REF ASP

?????? ????????? ?????? ?????????
???? ???????: 255043 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

?? ??????? ?? Microsoft Data Access Components (MDAC) 2.5 ????? ???? OLEDB Microsoft Oracle ???? ???? ????? Oracle ???? ???? ??????? ?? ??? ?????? REF ???? ?? ??????? ??????? ?????? ?????? ActiveX (ADO). ??? ??? ??? ??????? ??? ?? ???? OLEDB Microsoft Oracle. ?? ????? ODBC Microsoft ??????? Oracle ??????? ???? ?????? REF.

??????? ????

??? ??????? ??????? ??? ??? ??????? ??? ???? ???????:
  • ?? ????????? ??????? ?? ?????? ??????? ??????? ???????? ?????? ????? ADO ?? ????? Oracle ?? ??????? ???? PL/SQL ??? ???? ?? ??? ??????? ?? ?????? ???????. ?? ???? ???? ????? ??? ??? ????? ???? ?????? REF ???? ?? ????? ???? ???? ???????.

    ?????? ??? ??????? ?????? ??? ??????? ????????? Oracle ???? ??????? PL/SQL "? ???? ??? ??? ??????? ????? ?????? ??" ????? ??????? ?? Microsoft:
    229919????? ??????? ?????? ????? ?? Oracle ???????? ADO ??? ASP
  • ?? ??????? ?????? ?? ?????? ???? ????? ???? ?????? ???? ??????? ???? ?? ???? ?? ?????? ???????. ??? ??? ?????? ????? ADO ???????? ??? ?????? REF ?? ??? ??? ?????? ??????. ?? ???? ???? ????? ??? ????? 0 ?? ??? ??? ???????. ??? ???? ??????:

    {call curspkg_join.open_join_cursor1(?, {resultset 0, io_cursor})}
    					
???????? ??????? ?? ??? ???????:
  • ??? ?? ???? proficient ?? Microsoft Visual Basic Scripting Edition (VBScript) "?" ?????? ?????? ActiveX (ADO) "?" ????? ?????? ?????? (ASP).

  • ??? ??? ????? ??? Oracle ? ???? ??? "??? ?????????" ?????/Structured ??????? ????? Oracle.

  • ??? ????? ???? ???? ??????? ?????? (IIS) ???? ???? ????? ?? ????? ?????? Oracle.

    ?????? ??? ??????? ??????? ???? ??? ??? ??????? ????? ?????? ?? "????? ??????? ?? Microsoft:
    193225????? ????? IIS ??????? ?? Oracle ?? ASP ? ADO

??? ?????

????? ????????? ???????? ?????? ???? ????? ??????? ?????? ????? ADO ?? ????? Oracle ???? ?????? REF ???? ?? ??? ???????? ??? ???? ASP. ??? ????? ????? ????? OLEDB ????????? ?? ????????? ???????? ?? ASP ??????? ?????? ?????? Oracle.

  1. ????? ???? Oracle ??????? ??? ???? Oracle ??? ????? ?? ?? ????????? ???????? ?? ASP. ?????? ??? ?????? ??? ??????? ????? ?? ???? Oracle ????/Tiger. ??? ????? ???? Oracle ????/Tiger ?? ??????? Oracle ?????????. ?? ???? ??? ?????? ? ??? ????? "??????? ?????? ??????" ?????? ?? ????? ??? ????????? ?? ???????:

    ??????? ?????? ??????
    CREATE TABLE DEPT
    (DEPTNO NUMBER(2,0) NOT NULL, 
    DNAME VARCHAR2(14) NULL, 
    LOC VARCHAR2(13) NULL,
    PRIMARY KEY (DEPTNO)
    );
    
    CREATE TABLE EMP
    (EMPNO NUMBER(4,0) NOT NULL, 
    ENAME VARCHAR2(10) NULL, 
    JOB VARCHAR2(9) NULL, 
    MGR NUMBER(4,0) NULL, 
    HIREDATE DATE NULL, 
    SAL NUMBER(7,2) NULL, 
    COMM NUMBER(7,2) NULL, 
    DEPTNO NUMBER(2,0) NULL,
    FOREIGN KEY (DEPTNO) REFERENCES DEPT(DEPTNO),  
    PRIMARY KEY (EMPNO)
    );
    						

    ???? ??????? ??????
    CREATE OR REPLACE PACKAGE curspkg_join AS 
    	TYPE t_cursor IS REF CURSOR ; 
    	Procedure open_join_cursor1 (n_EMPNO IN NUMBER, io_cursor IN OUT t_cursor); 
    END curspkg_join;
    / 
    
    CREATE OR REPLACE PACKAGE BODY curspkg_join AS
    Procedure open_join_cursor1 (n_EMPNO IN NUMBER, io_cursor IN OUT t_cursor) 
    IS 
    	v_cursor t_cursor; 
    BEGIN 
    	IF n_EMPNO <> 0 
    	THEN
    		OPEN v_cursor FOR 
    		SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME 
    			FROM EMP, DEPT 
    			WHERE EMP.DEPTNO = DEPT.DEPTNO 
    			AND EMP.EMPNO = n_EMPNO;
    
    	ELSE 
    		OPEN v_cursor FOR 
    		SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME 
    			FROM EMP, DEPT 
    			WHERE EMP.DEPTNO = DEPT.DEPTNO;
    
    	END IF;
    	io_cursor := v_cursor; 
    END open_join_cursor1; 
    END curspkg_join;
    / 
    						
  2. ???? ?????? ???????? ????? ASP ???? ?????? ??????? ??????:
    <%@ Language=VBScript %>
    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    </HEAD>
    <BODY>
    <P>
    <%
    	Const CONNECT = "Provider=MSDAORA.1;Data Source=your_tns_alias_name;User ID=scott;Password=tiger"
    		
    	Dim cn, rs, cmd, param
    	Dim SQL
    
    	set cn = Server.CreateObject( "ADODB.Connection" )
    	cn.Open CONNECT	
    
    	SQL = "{call curspkg_join.open_join_cursor1(?, {resultset 0, io_cursor})}"
    	set cmd = server.CreateObject ("ADODB.Command")
    	with cmd
    		set .ActiveConnection	= cn
    	    .CommandText			= SQL
    	    .CommandType			= 1		'adCmdText
    	    'Pass in 0 to retrieve all of the records
    	    set param = .CreateParameter("id", 131 , 1 , , 0)  '<<131=adNumeric, 1=adParamInput
    	    .Parameters.Append param
    	end with
    					
    	set rs = server.CreateObject ( "ADODB.Recordset" ) 
    	set rs = cmd.execute
    		    
    	%>
    	<TABLE WIDTH="80%" ALIGN=center BORDER=1 CELLSPACING=3 CELLPADDING=3>
    	<%
    	Response.Write ("<TR bgcolor=Gray>")
    	For i = 0 To rs.Fields.Count - 1
    		Response.Write ("<TD>" & rs.Fields(i).Name & "</TD>")
    	Next
    	Response.Write ("</TR>")
    	Do until rs.EOF
    		response.write ("<TR>")
    		for i = 0 to rs.Fields.Count - 1
    			If IsNull(rs(i).value) then 
    				Response.Write ("<TD> NULL </TD>")
    			else 
    				Response.Write ("<TD>" & rs(i).value & "</TD>")
    			end if 
    		next 
    		rs.MoveNext
    		response.write ("</TR>")
    	loop
    	%>
    	</TABLE>
    	<%
    	Set cmd = Nothing
    	Set param = Nothing
    	rs.close
    	Set rs = Nothing
    	cn.close
    	Set cn = Nothing
    %>
    </P>
    </BODY>
    </HTML>
    						

?????

????? ?? ????????? ??? MDAC ?????? ?????? ???? ?????? ??? ?????:
http://msdn2.microsoft.com/en-us/data/aa937695.aspx
????? Oracle8 Enterprise Edition

???????

???? ???????: 255043 - ????? ??? ??????: 30/???? ??????/1428 - ??????: 3.3
????? ???
  • Microsoft OLE DB Provider for Oracle Server 1.0
????? ??????: 
kbmt kbhowto kboracle KB255043 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????255043
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com