?
Solved

dbase_replace_record() problems

Posted on 2001-07-06
10
Medium Priority
?
261 Views
Last Modified: 2012-06-21
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,$shiftname,$start,$finish,$duration,$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?
0
Comment
Question by:REMarlow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 15

Expert Comment

by:a.marsh
ID: 6259220
What version of PHP are you using?

Ant
0
 

Author Comment

by:REMarlow
ID: 6259232
4.10
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6259233
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
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Expert Comment

by:a.marsh
ID: 6259244
4.10?

There's no such version.....do you mean 4.01?

Ant
0
 

Author Comment

by:REMarlow
ID: 6259246
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)
0
 

Author Comment

by:REMarlow
ID: 6259259
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)
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6259275
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
0
 
LVL 15

Accepted Solution

by:
a.marsh earned 800 total points
ID: 6259284
I've never used anything related to dbase so I can't recommend which version to try - might be worth trying some older versions though.

:o)

Ant
0
 

Author Comment

by:REMarlow
ID: 6259314
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
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6259326
Glad to have been some help.

Thanks for the A!

Good luck in getting it working.

:o)

Ant
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question