Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003

    Unanswered: Visual Basic to Oracle connection


    Can someone please provide me detailed instructions on how I can connect Visual Basic 6.0 Professional to Oracle 8.1.5 (which is on a server) using the Oracle Driver (not Microsoft ODBC Driver)?
    Do I need a DSN and TSN?
    What is the VB code that I use and where would I place it in my VB Project?
    What references/libraries do I need--how would I add them to the project?
    How can I send a SQL queries and retrieve results from the Oracle server?
    As you can tell, this is my first time doing this...please help. I would greatly appreciate it. Thanks.

  2. #2
    Join Date
    Nov 2002
    Desk, slightly south of keyboard

    Q: I'd like to learn some Oracle/VB stuff, and don't know that google exists. What do I do?

    A: You start by typing

    into your browser.

    Once you hit a particular problem, you then try newsgroups or forums.


  3. #3
    Join Date
    Nov 2003
    Rotterdam, Netherlands
    It depends on which Object u r using for data access.
    Normally its ADO.

    first u have to declare a ADODB connection object and set the connection string like

    con.CONNECTString = 'DSN=<<name of dsn>> uid=<<oracle user>> pwd = <<password>>'

    This is the method using DSN, also u can use the Service Provider.

    For Getting data from Oracle, U have to declare a ADODB.RECORDSET object and set the ActiveConnection property of the recordset to the connection u already opened (Eg CON) and
    then set the command string property to the required SQL String

    Then open the Record set. Now u ahve all the records in ur recordset.

    Look into MSDN, it will be with ur software cds.


Posting Permissions

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