PDA

Click to See Complete Forum and Search --> : Connecting to oracle via ODBS & ADO - Why so slow?


puma
Oct 12th, 2000, 05:54 AM
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

puma
Oct 12th, 2000, 05:56 AM
Sorry - still got the shakes this morning i meant ODBC not ODBS!

honeybee
Oct 12th, 2000, 11:36 AM
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.