puma
10-12-2000, 06:53 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
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