名称值 整数值 功能
adDBTimeStamp 135 日期时间数据类型
adDecimal 14 十进制整数值
adDouble 5 双精度小数值
adError 10 系统错误信息
AdGUID 72 全域性唯一识别字(Globally unique identifier)
adDispath 9 COM/OLE自动对象(Automation Object)
adInteger 3 4字节有符号整数
adIUnknown 13 COM/OLE对象
adLongVarBinary 205 大型2字节值
adLongVarChar 201 大型字符串值
adLongVarWChar 203 大型未编码字符串
adNumeric 131 十进制整数值
adSingle 4 单精度浮点小数
adSmallInt 2 2字节有符号整数
adTinyInt 16 1字节有符号整数
adUnsignedBigInt 21 8字节无符号整数
adUnsignedInt 19 4字节无符号整数
adUnsignedSmallInt 18 2字节无符号整数
adUnsignedTinyInt 17 1字节无符号整数
adUserDefined 132 用户自定义数据类型
adVariant 12 OLE对象
adVarBinary 204 双字节字符变量值
adVarChar 200 字符变量值
advarchar 202 未编码字符串变量值
adWchar 130 未编码字符串
方向值的意义如上:
名称值 整数值 功能
adParamInput 1 允许数据输入至该参数当中
adParamOutput 2 允许数据输出至该参数当中
adParamInputOutput 3 允许数据输入、输出至该参数当中
adparamReturnValue 4 允许从一子程序中返回数据至该参数当中
CREATE OR REPLACE PROCEDURE P_ADDSTATION
(
P_stationname IN VARCHAR2,
P_drumbbeating IN VARCHAR2,
R_code OUT INT
)
IS
v_errid VARCHAR2 (80);
v_errmsg VARCHAR2 (800);
BEGIN
INSERT INTO STATIONINFO VALUES(P_stationname,SEQ_STATION_STATIONUM.nextval,P_drumbbeating);
commit;
r_code := 1;
EXCEPTION
WHEN OTHERS
THEN
BEGIN
v_errid := SQLCODE;
v_errmsg := SQLERRM;
p_catchexception ('P_ADDSTATION',
'电台添加',
P_stationname,
v_errid,
v_errmsg,
'异常',
NULL
);
r_code := -1;
RAISE;
END;
END;
/
<%
'set conn = server.CreateObject("adodb.connection")
'connstr = "Provider=OraOLEDB.Oracle.1;Persist Security Info=True;User ID=aaa;Password=aaa;Data Source=jfdboss"
'conn.open connstr
set Conn=server.CreateObject("adodb.Connection")
conndb="Provider=MSDAORA.1;Password=aaa;User ID=aaa;Data Source=jfdboss;Persist Security Info=True"
Conn.Open(conndb)
%>
------------------------------------------------------------------------------------------------------------------
----
<%
stationname="电台"
drumbbeating="4343.jpg"
set comm=server.CreateObject("adodb.command")
set comm.ActiveConnection=Conn
comm.CommandText="P_ADDSTATION"
comm.CommandType=4
comm.Parameters.append comm.CreateParameter("p_stationname",200,1,30,stationname)
comm.Parameters.append comm.CreateParameter("p_drumbbeating",200,1,30,drumbbeating)
comm.Parameters.append comm.CreateParameter("r_code",3,4)
comm.execute()
error=comm.Parameters("r_code").Value
Response.Write error
set comm.ActiveConnection=nothing
set comm=nothing
function getplayflaglist(playtype)
getplayflaglist="select playnum,playname,playaddress from playcommend where playtype='"& playtype &"' and flag='1'"
end function
%>
------------------------------------------------------------------------------------------------------------------
----
<%
set query=server.createobject("adodb.recordset")
sql=getplayflaglist("1")
query.open sql,conn,1,1
if not query.eof then
do while not query.eof
%><%=query("playaddress")%><%=query("playnum")%><%=query("playname")%><%
query.movenext
loop
end if
query.close
set query=nothing
%>
<%
conn.close
set conn=nothing
%>