'打开数据库,打开test数据表以Rs为记录集 Set Orasession=CreateObject("OracleInPRocServer.XOraSession") Set OraDatabase=OraSession.DbOpenDatabase("autop","system/manager",0) Set rs=OraDatabase.CreateDynaset("select * from test order by id desc",0)
'求ID值 if rs.eof then id=1 else id=rs("id")+1 end if
'关闭数据连接。 rs.close set rs=nothing Set OraSession=nothing Response.end End If %> <html> <body> <form method="POST" action="test.asp"> <p><font color="#FF0000"><b>Oracle大字段在ASP中存取问题的解决:</b></font></p> <p><textarea rows="13" name="text" cols="104"></textarea></p> <p><input type="submit" value="存入" name="B1"></p> <input type="hidden" name="ok" value="1"> </form> </body> </html>
2、数据调出程序:view.asp <%
'连接数据库,以只读方式打开数据表 Set OraSession=CreateObject("OracleInProcServer.XOraSession") Set OraDatabase=OraSession.DbOpenDatabase("autop","system/manager",0) Set Rs=OraDatabase.DbCreateDynaset("select * from test order by id desc",4)