Alex Thurgood ha scritto:
Hi Frank, Sergio,

It would appear that the 3.51 ODBC driver only supports dynamic cursors in 
FORWARD_ONLY and STATIC modes if this page is correct : Est-ce que MyODBC accepte les curseurs dynamiques?

Oui. MyODBC 3.51 supporte les curseurs dynamiques avec les modes Forward-only 
et static.

A cause des problèmes de performances, le pilote ne supporte pas cette fonctionnalité par défaut. Vous pouvez l'activer en spécifiant l'option de connexion OPTION=32 ou en cliquant dans l'option Enable Dynamic Cursor dans le panneau de configuration DSN.
For those who don't speak French :
Does MyODBC accept dynamic cursors?
Yes. MyODBC 3.51 supports dynamic cursors in Forward-Only and Static modes
For performance reasons, the driver does not enable this functionality by default. It can be activated by specifying the connection option OPTION=32 or by clicking on the Enable Dynamic Cursor tickbox in the DSN configuration panel.


I tried it, but probably don't work with MySQL 5.1.
It can be useful for Ubuntu, so I will try with it.
----- "Frank Schoenheit, Sun Microsystems Germany" <> a 
écrit :

Hi Sergio,

oStmt = oConn.createStatement()
oStmt.setPropertyValue("ResultSetType", oStmt.setPropertyValue("ResultSetConcurrency",
oRs = oStmt.executeQuery(sql_string)
c = oRs.getRow
print c '= 1
print oRs.getRow '= 2
oRs.absolute(c) 'give False with MySQL only
print oRs.getRow '= 2 ***error*** with MySQL only

If I connect to HSQL, it works giving 1 at the end, while if I
to MySQL, it return 2 at the end.
Do I make an error?

MySQL 5.1.40 - Connector 3.51.27 - OOo 3.1.1
In general, the result set type you specify (SCROLL_INSENSITIVE, in
example) is a request which might not necessarily be fulfilled by the
database driver. That is, the driver is free to "downgrade" it, if it
doesn't support a particular type. Whether this downgrade happens
silently, or with a warning (or not at all, but execution would
is at the discretion of the driver.

That said, it might be (do not know this out of my head) that the
Connector decided to downgrade your result set type to FORWARD_ONLY.
this case, "absolute" is not expected to work, only "next" can be used

Provided that the driver provides proper information, you can check
  Print oRs.ResultSetType ' should be 1004 [1]
, or, if you need the information before actually executing the
  Print oConn.MetaData.supportsResultSetConcurrency( _, _ )
(However, the latter method is known to be improperly implemented by
some drivers, though I think the MySQL Connector is not amongst

If you find that indeed the SCROLL_INSENSITIVE type is not supported
the driver, then you might consider upgrading the Connector/ODBC -
finally, the 3.51 series is *really* old meanwhile.


I will update to 5.1 ASAP.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to