Problems Upgrading from 2.1 to 2.5 with Async Command/Connection

Problems Upgrading from 2.1 to 2.5 with Async Command/Connection

Post by Gary C. Shield » Thu, 22 Jun 2000 04:00:00



When I upgraded ADO from 2.1 to 2.5 I got a HUGE Performance Decrease with
Asynchronous Operations.  In fact it doesn't really behave asynchrounously
anymore.  On a WinNT Box when I uninstalled 2.5 (with CC), the performance
went back to normal.
The other odd thing is that Commands that I don't execute Asynchronously
(set myRS = cmd.Execute) still Raise the cn_ExecuteComplete Event.  I don't
remember this happenening with 2.1.

Questions:
1. Ideally I would like my performance back with ADO 2.5.  Can someone
please point out the ridiculous mistake I am making?  I am fairly positive
it is my fault. See Sample Code Below.

2. Is there anyway to uninstall ADO 2.5 on Win2K.  I tried using the the
"C:\ComCheck\ComCheck /D"  However, after I run it, I never see the
"Reconfigure ..." Option like I did on WinNT 4.0?

Thanks in advance,

Gary

============================================================
Sample Code:

Dim WithEvents cn as Connection
Dim cmd as Command
Dim myCString as String

Public Sub Class_Initialize
    set cmd = new Command
    set cn = New Connection
    myCString = "Whatever"
    cn.ConnectionString = myCString
    cn.Open

    cmd.name = "MyCommand"
    cmd.CommandType = adCmdStoredProc
    Set cmd.ActiveConnection = cn

End Sub

Public Sub RunMyCommand()
    Dim sCommandTxt As String

    cmd.Cancel

    sCommandTxt = "GetDataWithMySP"

    cmd.CommandText = sCommandTxt
    Call cmd.Execute(, , adAsyncExecute)

End Sub

Private Sub cn_ExecuteComplete( **Deleted for brevity**)

    If pCommand.Name = "MyCommand" then Debug.Print " Hey I am Finished"

End Sub

 
 
 

1. Problem when upgrading MDAC 2.1 to 2.5

This WebClass runs well when MDAC is in 2.1 (2.1.2 4202.3).
But when MDAC is upgraded to 2.5 (2.50 4403.12) on NT server, problem
happened; WebClass crashed with a "Out of Memory" showed up in the
beginning.

I debugged all day and found a consistent patten as shown in the
following explanation:
1) If there are more than 2 input query parameters and the
CursorLocation = adUseClient the WebClass will crash
The message on web is "out of memory" or "row handler must all be
released before new ones can be obtained".
2) if there are more than 2 input query parameters and the
CursorLocation = adUseServer then
RecordCount = -1 for all 12 combinations of 4 CursorType and 3
LockType .
3) If there are 2 parameters, when the CursorLocation = adUseClient,
RecordCount returns correct number for all 12 combinations of 4
CursorType and 3 LockType .
4) If there are 2 parameters, when the CursorLocation = adUseServer
then RecordCount = -1 for all 12 combinations of 4 CursorType and 3
LockType .

The coding is as following (I simplify the original coding to present
the relevant)  :
<%
Set rs = New ADODB.Recordset
Set objConn = New ADODB.Connection

'rs.CursorType = adOpenForwardOnly
'rs.CursorType = adOpenKeyset
'rs.CursorType = adOpenDynamic
rs.CursorType = adOpenStatic

'rs.CursorLocation = adUseServer
rs.CursorLocation = adUseClient

'rs.LockType = adLockReadOnly
'rs.LockType = adLockPessimistic
rs.LockType = adLockOptimistic

objConn.Open "DRIVER={Sybase System
11};SRVR=TREE;DB=APPLE;UID=readonly;PWD=readonly;"
rs.Open "select red, green, yellow from APPLE" , objConn

Debug.Print rs.RecordCount
'rs.Close
'rs.ActiveConnection = Nothing
%>

Same problems happen on using MDAC 2.6 and even resuming to MDAC 2.1
which was running well before.
I can not resume the good running status, the program is no good for
any of the MDACs.

Since MDAC includes ODBC which defines the spec of API which different
ODBC driver uses to link to its DBMS,
will a change of MDAC from 2.1 to 2.5 have some impact on the Sybase
ODBC driver to make
the data fetching normally?
Does this mean that Sybase ODBC driver possibly have to be changed
when the MDAC is changed? if the
porting of data is not as smooth as before. In this case, there are
only 2 fields can be returned after the
MDAC is upgraded from 2.1 to 2.5; but originally there are more than 2
(it is 6 rows) returned without problem.
Do I miss anything? I do not understand Sybase ODBC driver that much
so please excuse me if I am wrong.

I appreciate any share of knowledge or experience of upgrading MDAC
2.1 to 2.5. Thanks in advance.

2. Profilier and Windows XP

3. Any problems Upgrading ADO 2.1 to ADO 2.5?

4. Cognos, Data General, NeXT

5. Upgrading from 2.1 to 2.5

6. REQ:MDIS Reality-X @(-nnn)

7. Upgrading from ADO 2.1 to ADO 2.5

8. MSDE install with Instance Name installs as default server

9. Upgrade MDAC 2.1 to 2.5????

10. Problem ( Bug ?? ) with ADODB ( 2.1, 2.5, 2.6 SP1 )