Gossamer Forum
Home : Products : DBMan : Discussions :

empty .db file

Quote Reply
empty .db file
picture this:
An already existing .db file with a couple of entries.
=> A default user enters a new record, gets a 'successfully added' message and the .count file goes one up.
After that the .db file is wiped clean!!

How comes?

_wally

Quote Reply
Re: empty .db file In reply to
What changes have you made to the script?

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: empty .db file In reply to
I've modified it a fair bit.
And it was my first thought that something is wrong with it due to these changes. But then again a 2.nd DB is using the same CGI without having troubles when adding a new record.

Could it be a matter of authorization?

_wally

Quote Reply
Re: empty .db file In reply to
I don't know. It sounds like you have a problem in sub add_record. My first thought was that you had

open (DB, ">$db_file_name") or &cgierr(...

instead of

open (DB, ">>$db_file_name") or &cgierr(...

That would do it.

But it could be a number of other things, too. There's no way of knowing without looking at the code.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: empty .db file In reply to
... got it going again!
Thanks for the idea JPDeni.

I went back to scratch, started all over again from the orig.script.
But I've still got no clue why the 2.nd DB was working all right with the mocked up alternations in the first place.

ta, _wally