RE: [PHP-DEV] odbc problems in 4.2
Hi Dan I've been trying out with the snapshots from snaps.php.net/win32 but I still have the same errors. The actual snaps of 4.2 don't work either. Christoph I'm looking into these problems right now. Please be patient. A recent slew of bug reports suggests that there might be some stuff that is working for me here locally, but not for other setups.. As for getting a hold of a different version, the best I can suggest right now is A) try a snapshot from http://snaps.php.net/win32 or B) build your own (requires VC++, or some such compiler). On Fri, 26 Apr 2002, Ryan Jameson (USA) wrote: is this it then? How hard is it to get a hold of a version that is compiled the same way as my version 4.1.1? I'd really like to upgrade. I do have the tools I need to compile my own version but I'm not set up to do it and for the last 4 years of using PHP I haven't had to since the distributions have all worked. Thanks. Dan Kalowsky wrote: Hi Ryan, Okay did a little looking over the odbc_fetch_row code, and it should reset the result-fetched to whatever the second argument (if one is provided) is. This variable is how the ODBC result system handles where it currently is in the cache. Now the catch is that odbc_result checks this value, and if it's set to 0 re-fetches the results. This should be perfectly ok, just as if you start with a fresh resultset. Row # 0 doesn't contain data. So in otherwords the code sample you sent should work, provided that the $rs is a valid result. I'm having some local DB access/ODBC issues so I cannot test it right at the moment. I'm working on fixing that. On Wed, 24 Apr 2002, Ryan Jameson (USA) wrote: If this is easy for anyone could someone verify that: odbc_fetch_row($rs,0); ...does not reset the result set in version 4.2? From what I can tell it doesn't work at all. I want to be certain that we cannot upgrade to 4.2. If someone has another way to reset an ODBC result set I'd love to hear about it. It's done in a central core function, but is necessary in a plethora of scripts. The result set comes from the MS SQL Server driver (shhh... I tried to get them to use MySQL ... they are scared of free stuff. I'm just glad they let me use PHP). Thanks! Just to clarify: The odbc module doesn't cache or refetch resultsets. Whether you're able to reset a resultset depends on the odbc driver or driver manager you use (And how PHP was compiled, see below). If the driver doesn't support so called scrollable cursors, some Driver Managers (afaik unixODBC and the standard MS Windows DM do) provide support for this via a cusror library that caches resultsets and emulates scrolling cursors. My guess is that the PHP 4.2 you've tried was wasn't compiled with HAVE_SQL_EXTENDED_FETCH (so only the simple SQLFetch that can only move forwards gets used; the rownum parameter is ignored in this case) or that your DM wasn't configured to use it's cursor library. -Andreas
RE: [PHP-DEV] odbc problems in 4.2
is this it then? How hard is it to get a hold of a version that is compiled the same way as my version 4.1.1? I'd really like to upgrade. I do have the tools I need to compile my own version but I'm not set up to do it and for the last 4 years of using PHP I haven't had to since the distributions have all worked. Thanks. Ryan -Original Message- From: Andreas Karajannis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 5:16 PM To: Dan Kalowsky Cc: Ryan Jameson (USA); [EMAIL PROTECTED] Subject: Re: [PHP-DEV] odbc problems in 4.2 Dan Kalowsky wrote: Hi Ryan, Okay did a little looking over the odbc_fetch_row code, and it should reset the result-fetched to whatever the second argument (if one is provided) is. This variable is how the ODBC result system handles where it currently is in the cache. Now the catch is that odbc_result checks this value, and if it's set to 0 re-fetches the results. This should be perfectly ok, just as if you start with a fresh resultset. Row # 0 doesn't contain data. So in otherwords the code sample you sent should work, provided that the $rs is a valid result. I'm having some local DB access/ODBC issues so I cannot test it right at the moment. I'm working on fixing that. On Wed, 24 Apr 2002, Ryan Jameson (USA) wrote: If this is easy for anyone could someone verify that: odbc_fetch_row($rs,0); ...does not reset the result set in version 4.2? From what I can tell it doesn't work at all. I want to be certain that we cannot upgrade to 4.2. If someone has another way to reset an ODBC result set I'd love to hear about it. It's done in a central core function, but is necessary in a plethora of scripts. The result set comes from the MS SQL Server driver (shhh... I tried to get them to use MySQL ... they are scared of free stuff. I'm just glad they let me use PHP). Thanks! Just to clarify: The odbc module doesn't cache or refetch resultsets. Whether you're able to reset a resultset depends on the odbc driver or driver manager you use (And how PHP was compiled, see below). If the driver doesn't support so called scrollable cursors, some Driver Managers (afaik unixODBC and the standard MS Windows DM do) provide support for this via a cusror library that caches resultsets and emulates scrolling cursors. My guess is that the PHP 4.2 you've tried was wasn't compiled with HAVE_SQL_EXTENDED_FETCH (so only the simple SQLFetch that can only move forwards gets used; the rownum parameter is ignored in this case) or that your DM wasn't configured to use it's cursor library. -Andreas -- Andreas Karajannis mediaworx berlin AG Fon (0 30) 2 75 80 - 266 Fax (0 30) 2 75 80 - 200 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] odbc problems in 4.2
I'm looking into these problems right now. Please be patient. A recent slew of bug reports suggests that there might be some stuff that is working for me here locally, but not for other setups.. As for getting a hold of a different version, the best I can suggest right now is A) try a snapshot from http://snaps.php.net/win32 or B) build your own (requires VC++, or some such compiler). On Fri, 26 Apr 2002, Ryan Jameson (USA) wrote: is this it then? How hard is it to get a hold of a version that is compiled the same way as my version 4.1.1? I'd really like to upgrade. I do have the tools I need to compile my own version but I'm not set up to do it and for the last 4 years of using PHP I haven't had to since the distributions have all worked. Thanks. Ryan -Original Message- From: Andreas Karajannis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 5:16 PM To: Dan Kalowsky Cc: Ryan Jameson (USA); [EMAIL PROTECTED] Subject: Re: [PHP-DEV] odbc problems in 4.2 Dan Kalowsky wrote: Hi Ryan, Okay did a little looking over the odbc_fetch_row code, and it should reset the result-fetched to whatever the second argument (if one is provided) is. This variable is how the ODBC result system handles where it currently is in the cache. Now the catch is that odbc_result checks this value, and if it's set to 0 re-fetches the results. This should be perfectly ok, just as if you start with a fresh resultset. Row # 0 doesn't contain data. So in otherwords the code sample you sent should work, provided that the $rs is a valid result. I'm having some local DB access/ODBC issues so I cannot test it right at the moment. I'm working on fixing that. On Wed, 24 Apr 2002, Ryan Jameson (USA) wrote: If this is easy for anyone could someone verify that: odbc_fetch_row($rs,0); ...does not reset the result set in version 4.2? From what I can tell it doesn't work at all. I want to be certain that we cannot upgrade to 4.2. If someone has another way to reset an ODBC result set I'd love to hear about it. It's done in a central core function, but is necessary in a plethora of scripts. The result set comes from the MS SQL Server driver (shhh... I tried to get them to use MySQL ... they are scared of free stuff. I'm just glad they let me use PHP). Thanks! Just to clarify: The odbc module doesn't cache or refetch resultsets. Whether you're able to reset a resultset depends on the odbc driver or driver manager you use (And how PHP was compiled, see below). If the driver doesn't support so called scrollable cursors, some Driver Managers (afaik unixODBC and the standard MS Windows DM do) provide support for this via a cusror library that caches resultsets and emulates scrolling cursors. My guess is that the PHP 4.2 you've tried was wasn't compiled with HAVE_SQL_EXTENDED_FETCH (so only the simple SQLFetch that can only move forwards gets used; the rownum parameter is ignored in this case) or that your DM wasn't configured to use it's cursor library. -Andreas --- Dan KalowskyThe record shows, I took the blows. http://www.deadmime.org/~dankAnd did it my way. [EMAIL PROTECTED] - My Way, Frank Sinatra [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] odbc problems in 4.2
Title: RE: [PHP-DEV] odbc problems in 4.2 -Original Message- From: Ryan Jameson writes: (shhh... I tried to get them to use MySQL ... they are scared of free stuff. I'm just glad they let me use PHP). Thanks! Thats a riot. Tell them to send a cheque to both the MySQL and PHP team for, say, US$20,000 each, and they can move on unfettered by that fear. :P Mike Robinson IT/Developer - Torstar Media Group Television Phone: 416.945.8786 Fax: 416.869.4566 Email: [EMAIL PROTECTED] To find out more about what we can do for you, please visit us at: http://www.tmgtv.ca/ and http://www.thestar.com/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] odbc problems in 4.2
Hi Ryan, Okay did a little looking over the odbc_fetch_row code, and it should reset the result-fetched to whatever the second argument (if one is provided) is. This variable is how the ODBC result system handles where it currently is in the cache. Now the catch is that odbc_result checks this value, and if it's set to 0 re-fetches the results. So in otherwords the code sample you sent should work, provided that the $rs is a valid result. I'm having some local DB access/ODBC issues so I cannot test it right at the moment. I'm working on fixing that. On Wed, 24 Apr 2002, Ryan Jameson (USA) wrote: If this is easy for anyone could someone verify that: odbc_fetch_row($rs,0); ...does not reset the result set in version 4.2? From what I can tell it doesn't work at all. I want to be certain that we cannot upgrade to 4.2. If someone has another way to reset an ODBC result set I'd love to hear about it. It's done in a central core function, but is necessary in a plethora of scripts. The result set comes from the MS SQL Server driver (shhh... I tried to get them to use MySQL ... they are scared of free stuff. I'm just glad they let me use PHP). Thanks! Ryan --- Dan KalowskyThe record shows, I took the blows. http://www.deadmime.org/~dankAnd did it my way. [EMAIL PROTECTED] - My Way, Frank Sinatra [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] odbc problems in 4.2
Dan Kalowsky wrote: Hi Ryan, Okay did a little looking over the odbc_fetch_row code, and it should reset the result-fetched to whatever the second argument (if one is provided) is. This variable is how the ODBC result system handles where it currently is in the cache. Now the catch is that odbc_result checks this value, and if it's set to 0 re-fetches the results. This should be perfectly ok, just as if you start with a fresh resultset. Row # 0 doesn't contain data. So in otherwords the code sample you sent should work, provided that the $rs is a valid result. I'm having some local DB access/ODBC issues so I cannot test it right at the moment. I'm working on fixing that. On Wed, 24 Apr 2002, Ryan Jameson (USA) wrote: If this is easy for anyone could someone verify that: odbc_fetch_row($rs,0); ...does not reset the result set in version 4.2? From what I can tell it doesn't work at all. I want to be certain that we cannot upgrade to 4.2. If someone has another way to reset an ODBC result set I'd love to hear about it. It's done in a central core function, but is necessary in a plethora of scripts. The result set comes from the MS SQL Server driver (shhh... I tried to get them to use MySQL ... they are scared of free stuff. I'm just glad they let me use PHP). Thanks! Just to clarify: The odbc module doesn't cache or refetch resultsets. Whether you're able to reset a resultset depends on the odbc driver or driver manager you use (And how PHP was compiled, see below). If the driver doesn't support so called scrollable cursors, some Driver Managers (afaik unixODBC and the standard MS Windows DM do) provide support for this via a cusror library that caches resultsets and emulates scrolling cursors. My guess is that the PHP 4.2 you've tried was wasn't compiled with HAVE_SQL_EXTENDED_FETCH (so only the simple SQLFetch that can only move forwards gets used; the rownum parameter is ignored in this case) or that your DM wasn't configured to use it's cursor library. -Andreas -- Andreas Karajannis mediaworx berlin AG Fon (0 30) 2 75 80 - 266 Fax (0 30) 2 75 80 - 200 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php