|
-
Oct 12th, 2000, 05:54 AM
#1
Thread Starter
New Member
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
-
Oct 12th, 2000, 05:56 AM
#2
Thread Starter
New Member
Sorry - still got the shakes this morning i meant ODBC not ODBS!
-
Oct 12th, 2000, 11:36 AM
#3
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|