Gossamer Forum
Home : Products : DBMan : Discussions :

db keeps changing...

Quote Reply
db keeps changing...
I'm pretty sure dbman isn't causing the problem, but my db keeps changing. Lately it's been happening quite frequently, but it happens when there is a change made to the db. Some times it removes the last data cell and the cr/lf at the end of a record so two records become one. Some times it removes all the record data except the enumorator cell (the first cell). Then other times it just deletes the entire record.

Has this happened to anyone else that can help me stop this?

~Terpy~
www.StLouis-Software.com
Quote Reply
Re: [terpy] db keeps changing... In reply to
It could possibly be something wrong in your .cfg file?

Could you make a text copy and post the url to where it can be viewed.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] db keeps changing... In reply to
I cut back on the number of cells in the .db file and it seems to be all right now. I had 18 cells so I cut one out. I realize there may not be a standard number of cells a flat file db can handle, but would 18 make it choke? I guess it could also depend on the amount data in each cell. As I find better (more efficient) ways to use the data available, I might cut it back even more just in case.

~Terpy~
www.StLouis-Software.com

Last edited by:

terpy: Aug 12, 2002, 12:06 PM
Quote Reply
Re: [terpy] db keeps changing... In reply to
I don't think the number of fields would cause you problems, it could have been something else that was simple to fix.

The reason we ask to see your files, is so we can help to spot any possible errors which would cause problems.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] db keeps changing... In reply to
I have also had the same types of problems. I have to admit that my database is HUGE (2MB+), but I've been having those sort of problems ever since it was about 300KB. Any ideas?

I want to switch to DBManSQL, but since I use my DB for a non-profit kids' game (see http://www.hfshc.com), the cost is quite prohibitive.
Quote Reply
Re: [ArtistikDD] db keeps changing... In reply to
You will see problems with having such a large database. Do you have large textarea fields? If so, you could possibly switch to using the external text file mod and store those large data fields in external text files.

Or possibly switch to using the relational mod if your data can be split up between a few databases.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] db keeps changing... In reply to
Hi LoisC,

I'm glad to be back at this forum and I hope everything's well with you.

I do have now some large textearea in records to be added and i'm unsure we can swith to "external files" or relational db at this stage ( a year later and 450 records) without causing any trouble to the original db file.

On another note, I got a copy today from a user of the automatic email response after a record is validated.

He gets on the top part of the email the following:

FROM:webmaster@gcs.alias

SENDER:Loudwind.com @isp.com

SUBJECT:Record Validated


My question is WHO"S gcs.alias? I called my isp, he tells me " no clue" of what it is!!

It is supposed to be Webmaster@loudwind.com, isn't it?

Is the script missing something? or is it "corrupt" somewhere!!!!!!!

Thank you for your dedicated help in this forum.

macagy
Quote Reply
Re: [macagy] db keeps changing... In reply to
Things are well with me thanks :)

In sub validate_records it should have:

print MAIL "To: $rec{$db_email_field}\n";
print MAIL "From: $admin_email\n";

In your .cfg file what do you have defined for the $admin_email variable? That is where it would get the defined email.
I'm assuming since they received the email that you have the db_email_field defined correctly.

It's not really hard to switch to the external text file mod. I did this will my recipe site which had close to 1,000 records.

You would just need to make backup copies and remove the textarea fields and add them to the text files with corresponding names of the record IDs. Time consuming perhaps but not difficult or impossible.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] db keeps changing... In reply to
Hi LoisC,

I checked the files, I've got
  • a correct sub_validate
  • cfg. variable:webmaster#loudwind.com


I do have to mention I do not ( as Admin ) receive an email when a user Add a Record:I always have to login as admin to look for any new record to be Validated. I mention it just in case it rings a bell for a possible answer to the weird GCS.ALIAS

For the Textarea what would you think if I'll increase its size to let's say 6000 characters, just for the time being until I see how big the project is evolving.

Any feedback is appreciated

Thanks

macagy
Quote Reply
Re: [macagy] db keeps changing... In reply to
You specifically have in your cfg file in the # Authorization Options section:

$admin_email = 'webmaster@loudwind.com';

You are showing it with a pound sign in your example?

Have you searched the database to see if it has that GCS.ALIAS, or isp.com in any of the records?

You will not automatically receive a notice that a record was added unless you have provided the codes within your add_success sub to send you a notification. In the FAQ under the section "Email" there are examples of the codes to add "Send Admin copy of new record".

You could increase the size of your textarea, but was that you saying your database was already over 2 megs? If so, increasing the size of the field is not going to help with any corruption that is happening.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] db keeps changing... In reply to
Hi,

in the # Authorization Options section:I've got

$admin_email = 'webmaster\@loudwind.com';

it was my mistake; sorry!!!


I'm actually looking at your website (great improvement!)the code for sending email to user and admin;the following is what my add_success sub looks like (NOTE:my BDMan uses
  • user_friendly html short/long
  • validate
  • file upload
  • forward email)


$page_title = "Record Added to the DealCenter";
&html_page_top;
%rec=&get_record($in{$db_key});
&html_record_long(%rec);
open (MAIL, "$mailprog") or &cgierr("unable to open mail program");
print MAIL "To: $admin_email\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: New Record at $html_title\n\n";
print MAIL "A new record was added at $html_title with the following information:\n\n";
foreach $column (@db_cols) {
print MAIL "$column: $in{$column}\n";


}
print MAIL "\n\n";
close MAIL;



# < -- Start page text -- >
print qq|
<P><$font>The following record was successfully added to the DealCenter database:</FONT>
|;
# < -- End page text -->



&html_footer;
&html_page_bottom;

It seems to have just half of the snippet of code compared to the one on your "Unoffical DBMan FAQ" Category(s): Email 512 22-Oct-2001




I'll check out the DB for GCS thing

I meant the size of the textarea was originally:

Rows 7 Cols 60 Maxlength 2000 and now i'm asking if I can increase those figures to hold a longer record.Am I making more sense?

As of now my DB file is 75K, not big at all

Thanks

macagy
Quote Reply
Re: [macagy] db keeps changing... In reply to
Not sure it makes a difference or not, but if you use single quotes than it's not necessary to add the slash before the @.

$admin_email = 'webmaster@loudwind.com';

One version has:

foreach $column(@db_cols) {
print MAIL "$column: $rec{$column}\n";
}

try that and see if it will send you the email. I usually also add:

print MAIL "-" x 75 . "\n\n";

after the subject line as it was recommended at one time.

The example you viewed was to send a copy to both admin and the user, that is the only reason there is more coding :)

Oh, I misunderstood, you can increase the size of the textarea field .. just make the changes in both the .cfg file and your html_record_form.

Yes, the FAQ went through a big change when I moved everything into a database. It's much easier to find things now :)

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] db keeps changing... In reply to
Hi LoisC,

Sorry to get back to you after a week but I wasn't at my desk for few days and first I want to thank you for your answers.

I will take the time later to correct the coding for both issues and let you know how it's performing.

Talk to you later

Thanks

macagy
Quote Reply
Re: [macagy] db keeps changing... In reply to
Hi LoisC,

I tried to add:

print MAIL "-" x 75 . "\n\n"; and all I get is DBMAN ERROR

so I took it off.

I did change

print MAIL "$column: $in{$column}\n";


to

print MAIL "$column: $rec{$column}\n"; but it doesn't seem to be a significant change if at all.

I'll take a look at your FAQ and see if I can find some answers to my problem

Thanks

macagy
Quote Reply
Re: [macagy] db keeps changing... In reply to
Hi LoisC,

I think I got the answer re:GCS.Alias;In fact the user added a record from his office at a huge company. It seems they've got a "Filtrer" for autoresponse mail and/or "unrecognized" senders. whatever the case may be it is a unique case.

Records were added and I called the users to find out what was in their email and it came from "admin" as it is supposed to be.So that one is done with.

Re: the email to admin not functionning I still can't figure out how and where to look to make that happen.

I've got some questions re:customization of DBMan; I'm going to post 'em there.I hope you'll take 2' to take a look at them.

Thank you

macagy