Problem when upgrading MDAC 2.1 to 2.5

Problem when upgrading MDAC 2.1 to 2.5

Post by pau » Sat, 04 Aug 2001 03:39:47



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.

 
 
 

Problem when upgrading MDAC 2.1 to 2.5

Post by Douglas Laudenschlage » Sat, 04 Aug 2001 06:02:50


1) The "Row handles must be released..." may be due to using
adLockBatchOptimistic with a CursorLocation of adUseServer.  Only ADO client
cursors support batch updating.  See Q261297, also Q257731.

2) The RecordCount property is not supported by all CursorTypes, only by
Static and Keyset.  If you specify adUseServer without a CursorType, you
have the default Forward-only which does not support RecordCount.  If you
specify adUseClient, you automatically have a Static cursor which does
support RecordCount.


Quote:> 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.


 
 
 

1. Upgrade MDAC 2.1 to 2.5????

We are being asked to upgrade from MDAC 2.1 to 2.5 on our web server.  After
the headaches we experienced after upgrading to version 2.1 we are really
reluctant to make this upgrade without hearing from others.

Any positivie or negative experiences from those who have upgraded would
really be appreciated.

Thanks,

John

2. mySql vs. Postgres

3. HELP: MDAC 2.1 and MDAC 2.5

4. Old server, New error: Error 951

5. MDAC 2.1 vs MDAC 2.5?

6. Update

7. MDAC 2.1 (GA) and MDAC 2.5 (RTM)

8. performance problems from MDAC 2.1 to 2.5

9. Problems Upgrading from 2.1 to 2.5 with Async Command/Connection

10. Any problems Upgrading ADO 2.1 to ADO 2.5?

11. (Bug of MDAC 2.5?) Error After Upgrading from MDAC 2.1 to 2.5

12. Access 97 vs 2000 + MDAC 2.1 SP2 vs 2.5