Gossamer Forum
Home : Products : DBMan : Customization :

garbled database

Quote Reply
garbled database
i'm having problems with a database getting corrupted and i can't figure out what's causing it or what to look for. i suspect it's caused by modifying a record. i'm using hack to change email address in pass and db file, so it could be that (but it's happening frequently enough that i don't think that's the hack causing it).

what's happening is: several records are being combined as one record. i have a dummy field as the last field in each record with a default value of zzzzz. when i open db with text editor, the zzzzz should be last thing on each line. but instead, i'll have a space and then the next record begins immediately instead of on a new line.

what should i look for on the cause??? thanks
Quote Reply
Re: [delicia] garbled database In reply to
Make sure your .db file has the same number of fields on each record. Something may have been corrupted at some point if you added or deleted fields.

Make sure the fields are numbered correctly in the .cfg file. It's easy to skip or repeat a number and that will mess everything up.

Those are the two things off the top of my head. Once we know those are all right, we can start thinking of other possibilities.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] garbled database In reply to
i had already checked the field numbers. i just opened the db in excel to be sure my zzzzz columns are lined up, so i know there are the right number of fields for each record. where do i look now? thanks!
Quote Reply
Re: [delicia] garbled database In reply to
You said what happens when you open the .db file in a text editor. What happens when you access it in DBMan?


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] garbled database In reply to
it seems to do fine when i display in dbman. the problem occurs when i try to change a record that has another one appended to it. i have the last field set to max length of 6, so when you modify the record it says the last field is too long because it's treating all the next record(s) as part of that field.
Quote Reply
Re: [delicia] garbled database In reply to
So the records all work out just fine in Excel, but not in DBMan? If they're okay in Excel, I don't think it's the .db file that's garbled.

Would it be possible for me to see the database in action?

Also, what modifications have you added?


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] garbled database In reply to
i'm catching a plane now -- will get back to you next week!! tks
Quote Reply
Re: [delicia] garbled database In reply to
A long time ago I realized that at times when people put extra spaces in the fields when filling out the form it would cause the database to be corrupted, especially during the modify function.

What I did which prevented this from happening was to add In sub parse_form the following 2 lines to be sure any extra spaces were removed.

$value =~ s/^\s+//g; # Trim leading blanks
$value =~ s/\s+$//g; # Trim trailing blanks

Hope this helps to solve your problem. It's worth a try and it won't hurt anything to add those lines.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] garbled database In reply to
thanks, i saw that in an old post and added it before i left town. just got back and will see if we've had any further problems.