Connecting to oracle database

Results 1 to 2 of 2

Thread: Connecting to oracle database

  1. #1
    Join Date
    Dec 1969

    Default Connecting to oracle database

    hi,<BR> Can I know the syntax to connect to oracle database using ASP script?<BR><BR>Thanks in advance,<BR>keerthi

  2. #2
    Ravi Kanth S Guest

    Default RE: Connecting to oracle database

    First of all You need to create a DSN for connecting to the database.<BR><BR>Then try to follow these steps<BR>&#060;%<BR>&#039include ADOVBS.INC<BR>%&#062;<BR>&#060;!--#include virtual="/your path/" --&#062;<BR>&#060;%<BR>&#039declare object variables<BR>Dim objConnction,objRecordset,strConnectstring,strSql< BR>&#039instantiate an ADO Connection object<BR>Set objConnection= Server.CreateObject("ADODB.Connection")<BR><BR>str Connectstring="driver=YourDsn;userid=scott;pwd=tig er"<BR>&#039 Open the connection<BR>objConnection.Open strConnectstring<BR>&#039instantiate an RecordSet Object<BR>Set objRecordset= Server.Createobject("ADODB.recordset")<BR>&#039cre ate the Sql Query<BR>strSql="select * from emp"<BR>&#039open the recordset<BR>objRecordset.Open strSql,objConnection<BR>%&#062;<BR><BR><BR>Hope this will Help You<BR><BR>If You don&#039t feel the other way<BR>"Please Go through some Good Bood like Teach Yourself or Nutshell<BR>about database issues and ADO"<BR>Happy Programming and wish You a very Happy and Successful New Year<BR><BR>RaviKanth S<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts