TenVolt
                          Tech Notes
ASP > Oracle articles:

 • Accessing an Oracle 9i database from an ASP page using VBScript
  Oracle Error VTK-1000 - To backup, restore, etc. in Oracle 9i you must have OMS set up first  Read
  Error starting the Oracle Agent service via the Control Panel Services dialog or with AGENTCTL.EXE in C:\oracle\ora\  Read

Return to index of articles

Accessing an Oracle 9i database from an ASP page using VBScript

Category: ASP
Category: Oracle

Once your schema, table and ODBC connection are set up (see our other article on setting up Oracle) then you can access the Oracle server using the standard ADO objects, e.g.: <% ' create connection to ORACLE Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "TNSNAME" TableName = "TBL_WHATEVER" SQL = "Select * From " & TableName Set RSViewFields = Server.CreateObject("ADODB.Recordset") RSViewFields.Open SQL, Conn IF RSViewFields.EOF THEN ' display error message ELSE ' display data DO UNTIL RSViewFields.EOF response.write( RSViewFields("fieldname") ) RSViewFields.MoveNext LOOP END IF RSViewFields.close set RSViewFields=NOTHING Conn.close set Conn=NOTHING %>

9/2/2003

 TuneVault
 Music & MP3's
 10v Calendar
 Online & Easy
 Craigger
 Various & Misc.
 RetroVault
 Toys Toys Toys!
   

All contents ©2003 Ten Volt Consulting. All rights reserved.
Unauthorized duplication or use is a violation of applicable laws.
Webmaster Contact