Gossamer Forum
Home : Products : DBMan : Discussions :

Error: Unable to Modify Record

Quote Reply
Error: Unable to Modify Record
Hello,

I have DBman set up correctly to my knowledge but when I go to modify a record I get the error:

Error: Unable to Modify Record
There were problems modifying the record: 11330 (can't find requested record)


I know this has something to do with the $db_key but I dont know what to set it to. My default.cfg file is uploaded as a text file to:
www.hanfordchamber.com/default.txt

Download it and check it out and please let me know why I keep getting this error!

You can also view the databse in action by going here:

http://www.hanfordchamber.com/dbman/db.cgi?db=default&uid=default

Thanks a lot in advance!
Kevin

Quote Reply
Re: Error: Unable to Modify Record In reply to
Hello Kevin, the pproblem is likely in your html.pl file - could you save that file as a text file and upload it to your server?

Thanks for uploading a file to begin checking!


Quote Reply
Re: Error: Unable to Modify Record In reply to
Thanks you very much for wanting to help me out!

My html.pl file is uploaded as a .txt file to:

http://www.hanfordchamber.com/html.txt

Thanks again for all your help!

Quote Reply
Re: Error: Unable to Modify Record In reply to
Hi Kevin, I believe the problem cause is found in
sub html_record

The ID is not being passed in search results. Try adding
<INPUT TYPE="hidden" NAME="ID" VALUE="$rec{'ID'}">
just above your table tag (about line 132 in your file) and see if that resolves the problem.




Quote Reply
Re: Error: Unable to Modify Record In reply to
Sorry, I just got arround to trying your suggestion and it didnt help...I may have misunderstood your instructions and done some thing wrong however....

Heres part of the html.pl:


sub html_record {
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.

my (%rec) = @_; # Load any defaults to put in the VALUE field.
($db_auto_generate and print &build_html_record(%rec) and return);

my $font_color = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399';
my $font = 'Font face="Verdana, Arial, Helvetica" Size=2';
my $table1 = 'ALIGN="Right" VALIGN="TOP" width="150"';
my $table2 = 'ALIGN="Left" VALIGN="TOP" width="275"';

print qq|
<INPUT TYPE="hidden" NAME="ID" VALUE="$rec{'ID'}">
<TABLE WIDTH="425" CELLPADDING=0 CELLSPACING=0 BORDER=0>


<TR><TD $table1>
<$font_color>Company Name:</FONT>
</TD><TD $table2>
<$font>$rec{'Company Name'}</Font>
</TD></TR>

Also the updated file has been reuploaded to the same place as specified in my last few messages.

Thanks a lot for your help again!
Kevin


Quote Reply
Re: Error: Unable to Modify Record In reply to
Hi Kevin - I'm reallystuck, too <smile>

The error message you've indicated is:
Error: Unable to Modify Record
There were problems modifying the record: 11330 (can't find requested record)

When I just accessed your db and did a list all, it indicates:
Your search returned 538 matches.

I'm confused on how you're getting a number so much greater than the number of records in your file.


Quote Reply
Re: Error: Unable to Modify Record In reply to
I have no idea either...im reallystuk
=]

Is the Id just based on the database entry number or is it something else?

I read in another string where this guy had to change his db_key or whatever it is from ID to something else. I tried changing mine to company name but it still didnt work. Any more Ideas?

Thanks
Kevin

Quote Reply
Re: Error: Unable to Modify Record In reply to
Hi Kevin, normally the ID field creates a unique, numeric entry for each record added and increments that numeric value by one each time a new record is added. I notice however that your config file indicates dbman is not supposed to track and increment the numbers.

I'm not sure where that number is coming from in the error message <<< stuck >>> since dbman is not tracking the number.

Can you post an example of one or two of your database entries (block out personal info from the record - just want to see the structure of the entry)?

Use the Check Private option at the top of this forum - I'll be sending you a message there too.

Quote Reply
Re: Error: Unable to Modify Record In reply to
Kevin, I did just notice something wrong on your default.cfg file. The field numbering should begin with 0 (zero) on the database.

Example:
'ID' => [0, 'alpha', ...
'Company Name' => [1, 'alpha', ...
'Contact' => [2, 'alpha', ...

You may need to put an 'empty' field in as field 0 in order for dbman to properly read the files. If you want to give that a try, make sure you add a hidden field in sub html_record_form also.

Back-up all files before making any big change such as this.



Quote Reply
Re: Error: Unable to Modify Record In reply to
Karen check your private messages....I sent a couple
=]

Thanks!
Kevin

Quote Reply
Re: Error: Unable to Modify Record In reply to
Hi Kevin, the corrected file has been uploaded with a _new extension. That file is the only one with changes and the changes are obvious.