sloppycode.net
ASP Database access: Oracle
Using Oracle with ASP.
Home
›
Code snippets
›
ASP
›
ASP Database access: Oracle
A very basic example (kept here for reference) of using Oracle with ASP. This example requires the Oracle ODBC drivers, available from
here
.
<% ' Over-ride 90 second default to 1 hour Server.ScriptTimeout = 21600 Dim Conn,RS,SQL,DSN DSN = "Provider=MSDAORA.1;Password=password;User ID=username;Data Source=server.domain.com;Persist Security Info=True;" Set RS = Server.CreateObject("ADODB.Recordset") Set Conn = Server.CreateObject("ADODB.Connection") ' Start time Response.Write "Started: " & Hour(Now()) & ":" & Minute(Now()) & ":" & Second(Now()) & "<br>" Conn.Open DSN ' Double quotes as the table has been imported SQL = "SELECT * FROM ""table""" RS.Open SQL,Conn,1,2 Do While Not RS.EOF i = i +1 RS.MoveNext Loop ' End Time Response.Write "Finished: " & Hour(Now()) & ":" & Minute(Now()) & ":" & Second(Now()) & "<br>" Response.Write i & " records found." %>
{Name}
Says:
{Date}
{Text}
› Home
› C#
› Snippets
› Articles
› Tools
› Taglines
› ASP
› Dictionary Object
› FSO
› Unix cheat sheet
› Gaming
› CSS
› Yak
› Umbraco
› About
› Contact
› Privacy
› Projects
› Search
› Sitemap
Buy on Amazon
Buy on Amazon
Buy on Amazon
Buy on Amazon