Results 1 to 3 of 3

Thread: Connecting to oracle via ODBS & ADO - Why so slow?

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    10

    Unhappy

    Please help

    I'm connecting to an oracle database via ODBC and ADO. I'm
    populating a DB Grid using a query based on the boundtext
    of a datalist. The datalist's recordsource is an Adodc data
    control.

    This works fine but the problem is it is
    so slow. I'm only using a test database with a couple of
    records in each table so the lack of speed must be due to
    the way i'm connecting.


    Any ideas?


    ____________________________________________________

    Dim conn As New ADODB.Connection
    Dim Cmd As New ADODB.Command
    Dim rs As New ADODB.Recordset

    dgdContract.Visible = True

    conn.Open "dsn=dsn;pwd=pwd"
    Set Cmd.ActiveConnection = conn
    Cmd.CommandType = adCmdText
    Cmd.CommandText = "SELECT a.name as AccountManager" _
    & ",c.startdate AS StartDate,c.paymentschedule as Frequency" _
    & ",c.contractid as hidethis " _
    & " FROM accmanager a, contract c" _
    & " WHERE a.accmanagerid = c.accmanagerid AND " _
    & "c.clientid=" & dblClient.BoundText

    MyClientID = dblClient.BoundText


    rs.CursorLocation = adUseClient
    rs.Open Cmd, , adOpenDynamic, adLockOptimistic
    Set dgdContract.DataSource = rs
    dgdContract.ReBind

    ________________________________________________________

    Cheers

  2. #2

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    10

    Thumbs down

    Sorry - still got the shakes this morning i meant ODBC not ODBS!

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

    Well ...

    If you are using ADO, why use ODBC? You can establish a DSN-less connection using ADO.

    If that does not solve the speed problem, check for your network speed, whether you are using server-side recordsets or client-side recordsets etc.

    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!

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