Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2002

    Unanswered: connect vb with oracle

    hi i'm new to vb and oracle, can someone give a an example on how to connect vb with oracle??
    my main task is to generate random number then connect to oracle to check if critiera are met,

    i need to submit my work soon. hope u all can help me asap

  2. #2
    Join Date
    Mar 2004

    Re: connect vb with oracle

    Dim cn as ADODB.Connection
    Dim rs as ADODB.Recordset

    Set cn = new ADODB.Connection

    'For STANDARD Security
    cn.ConnectionString = "Provider=OraOLEDB.Oracle;" & _
    "Data Source=MyOracleDB;" & _
    "User Id=myUsername;" & _

    'For Trusted Security
    cn.ConnectionString = "Provider=OraOLEDB.Oracle;" & _
    "Data Source=MyOracleDB;" & _

    set rs = new ADODB.recordset

    rs.ActiveConnection = cn

    rs.Open "SELECT * FROM Table1"



    Set rs=Nothing
    Set cn = Nothing

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

Posting Permissions

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