REMarlow
asked on
dbase_replace_record() problems
I'm working on a big project at the mo and it has to integrated with some windows software that uses .dbf's, so I have no choice but to use dbase (so don't give me a lecture on how much dbase sucks, hehe :o).
Unfortunately I can't get dbase_replace_record() to work properly, any help would be hugely appreciated.
I'm using the function basically like this:
$newvalues=array($shift,$s hiftname,$ start,$fin ish,$durat ion,$rate_ norm,$rate _ot,$rate_ min,$rate_ night);
dbase_replace_record($db,$ newvalues, $shift);
The database is open and everything is as it should be, I've tried dbase_add_record() in it's place and it works absolutely fine. I've made sure all the data types are correct (though if dbase_add_record() is anything to go by it doesn't really mind about that), I'm passing it the right number of fields (it gives an error otherwise anyway), and I've made certain that the variables being added to the array have values and that they are all present and correct in the array after the array has been created. I've even tried it by hardcoding the values rather than passing variables everywhere, just to make sure, but it makes no difference.
Basically I can't see anything wrong at all, except the result after running this is that all the fields in the record I replaced are NULL :o(
Any ideas?
Unfortunately I can't get dbase_replace_record() to work properly, any help would be hugely appreciated.
I'm using the function basically like this:
$newvalues=array($shift,$s
dbase_replace_record($db,$
The database is open and everything is as it should be, I've tried dbase_add_record() in it's place and it works absolutely fine. I've made sure all the data types are correct (though if dbase_add_record() is anything to go by it doesn't really mind about that), I'm passing it the right number of fields (it gives an error otherwise anyway), and I've made certain that the variables being added to the array have values and that they are all present and correct in the array after the array has been created. I've even tried it by hardcoding the values rather than passing variables everywhere, just to make sure, but it makes no difference.
Basically I can't see anything wrong at all, except the result after running this is that all the fields in the record I replaced are NULL :o(
Any ideas?
ASKER
4.10
Looking at the PHP bug database I found these:
http://www.php.net/bugs.php?id=6519
http://www.php.net/bugs.php?id=5835
You may need to use a different version of PHP.
:o)
Ant
http://www.php.net/bugs.php?id=6519
http://www.php.net/bugs.php?id=5835
You may need to use a different version of PHP.
:o)
Ant
4.10?
There's no such version.....do you mean 4.01?
Ant
There's no such version.....do you mean 4.01?
Ant
ASKER
sorry I mean 4.05, I was just trying to get the page back to say as much and it was taking forever on this crappy connection I've got here :o)
ASKER
Damn. Thanks for that. I see they fixed the same prob with dbase_add_record(), hence my successful test with that function.
Downloading 4.06 now, I'll see if it's fixed (though I don't hold out much hope).
If the bug is still there, and they aren't gonna fix it soon, I'm completely screwed - is there likely to be an earlier version of PHP in which the function works then? (I assume it worked once upon a time)
Downloading 4.06 now, I'll see if it's fixed (though I don't hold out much hope).
If the bug is still there, and they aren't gonna fix it soon, I'm completely screwed - is there likely to be an earlier version of PHP in which the function works then? (I assume it worked once upon a time)
Another bug report:
http://www.php.net/bugs.php?id=10984
It relates to 4.05 (on Windows) and is currently still open - you may want to keep an eye on it.
It may be worth you trying 4.06 (or even the latest CVS version - but that should not be used in a live application).
http://www.php.net/downloads.php
:o)
Ant
http://www.php.net/bugs.php?id=10984
It relates to 4.05 (on Windows) and is currently still open - you may want to keep an eye on it.
It may be worth you trying 4.06 (or even the latest CVS version - but that should not be used in a live application).
http://www.php.net/downloads.php
:o)
Ant
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Well, you know - couldn't really give you anything other than 'excellent' under the circumstances could I? :o)
Thanks for all your help Ant, I see that bug report is from May, so I've got my fingers crossed it's fixed for 4.06. Otherwise I'll be trying out pre 4.02 and praying everything else works too! :o)
Actually I suppose all I need is a working php_dbase.dll from somewhere, that way I wouldn't have to downgrade PHP itself.
Thanks again.
Robin
Thanks for all your help Ant, I see that bug report is from May, so I've got my fingers crossed it's fixed for 4.06. Otherwise I'll be trying out pre 4.02 and praying everything else works too! :o)
Actually I suppose all I need is a working php_dbase.dll from somewhere, that way I wouldn't have to downgrade PHP itself.
Thanks again.
Robin
Glad to have been some help.
Thanks for the A!
Good luck in getting it working.
:o)
Ant
Thanks for the A!
Good luck in getting it working.
:o)
Ant
Ant