On Fri, Feb 02, 2001 at 05:48:41PM +0100, Marcello Giovagnoli wrote:
> > 
> > Do you mean that mysql_store_result() should store everything to a
> > local file and and mysql_fetch... should read from this file?
> > This should not be that hard to do.

Like SQL_BUFFER_RESULT, but at the client instead of the server, I guess.

> Yes, you can use the actual SQL_CURSOR_FORWARD_ONLY that is 
> unused at this moment, to call mysql_store_result_on_file().

Many standard applications using ODBC may set that normally.
Using it to enable behaviour that'll carry an overhead for small to
medium sized results wouldn't be appreciated.

A quick fix for your case would be to make it an option
on the DSN alongside all the other MyODBC options.

Another tack: if you're on windows isn't it possible to get your ODBC
driver manager to use the Microsoft ODBC Cursor library? Via a call to
SQLSetConnectOption(...,SQL_ODBC_CURSORS,...).

If you can then you'd need to get your code to SQL_FETCH_LAST then
SQL_FETCH_FIRST.  The SQL_FETCH_LAST would cause the cursor library to
suck all the rows into a local disk cache. You'd get the added bonus of
being able to SQL_FETCH_PRIOR in addition to SQL_FETCH_NEXT.

Tim.

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to