Results 1 to 4 of 4

Thread: vb with oracle

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    1

    Question

    Can you help me how to connect vb through oracle. Any body posted odbc code.

    Thanks

  2. #2
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ....

    Use ADODC or RDC on your form, connect it to the Oracle database and copy its ConnectionString or equivalent properties into your code.

    If you still have problems, be specific and we shall try to answer you.

    Hope it helps. Don't shy from asking. Remember everyone has to start somewhere.

    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  3. #3
    Addicted Member
    Join Date
    Nov 1999
    Location
    y
    Posts
    141

    Vb and Oracle

    Hust change the connection string
    its simple ..

  4. #4
    Addicted Member
    Join Date
    May 1999
    Posts
    161
    Here is what I always use in my programs:

    You need to reference msado20.tlb (Microsoft ActiveX Data Objects 2.0 Library).

    Code:
    Dim db As New Connection
    Dim adoRS As New Recordset
    
    
    Dim ConnectionString As String
    ConnectionString = "Provider=MSDASQL;dsn=YourDSN;uid=UserID;pwd=Password;"
    
    db.Open ConnectionString
    
    
    Dim strSQL As String
    strSQL = "select something from wherevever"
    adoRS.Open strSQL, db, adOpenStatic, adLockOptimistic
    
    'You now can access the recordset adoRS like this:
    Dim Temp As Variant
    Temp = adoRS.Fields("something")
    I hope this helps

Posting Permissions

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



Click Here to Expand Forum to Full Width