SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Oct 2002
    Location
    Laval, Quebec
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Does eTest suport oracle database?

    If yes, I would like to know how to create the connection to oralce database and execute a query in VBA enviroment.

    Thank you very much for your help
    Amanda
    Amanda Ly

  2. #2
    Member
    Join Date
    Jul 2003
    Location
    UK
    Posts
    46
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Does eTest suport oracle database?

    Using ADO you can do like this -


    Dim conn As ADODB.Connection

    ' Open a connection using Oracle ODBC.
    Set conn = New ADODB.Connection
    conn.ConnectionString = "Driver={Microsoft ODBC for Oracle};" & "UID=user_name;PWD=user_passsword"
    conn.Open

    Dim rs As ADODB.Recordset

    ' Open the table.
    Set rs = New ADODB.Recordset
    rs.Open "TableName", conn, adOpenDynamic, adLockOptimistic, adCmdTable

    ' List the data in a listbox
    Do While Not rs.EOF
    txt = ""
    For Each fld In rs.Fields
    txt = txt & Trim$(fld.Value) & ", "
    Next fld
    If Len(txt) > 0 Then txt = Left$(txt, Len(txt) - 2)
    List1.AddItem txt
    rs.MoveNext
    Loop

    rs.Close
    conn.Close

    Note that you need to fill in a valid user name, password, and table for your database.
    Note also that this example uses the Microsoft ODBC driver for Oracle. Oracle also supplies drivers that you may be able to use instead.

    This example reads the data from the table and displays the values in a ListBox.

    Cheers,
    Jamie
    Jamie Lockhart, SCL
    http://www.scl.com/testing

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:47 AM.

Copyright BetaSoft Inc.