Gossamer Forum
Home : Products : DBMan : Installation :

Modify Record Problem

Quote Reply
Modify Record Problem
Well I thought I had it licked and everything was working properly. I just discovered that when an attempt is made to modify a record it doesn't work. I get the following error..

Error: Unable to Modify Record

There were problems modifying the record: (can't find requested record)
Please fix any errors and submit the record again.

In the origonal distribution there was an ID field entry in the cfg file. I removed it and have defined a field called Userid which is supposed to contain the userid info. Appearently it doesn't or isn't working right. Any ideas? Should I add the ID field back to the cfg file??

The ID's dbman is coming up with are...

I used lab as a log in name. All records posted under that name come out as laa, lab, lac, lad, etc. Is the ID field necessary to hold the numeric equivelent?

Hope someone can figure this cause I am running out of time..
Quote Reply
Re: Modify Record Problem In reply to
If you're using a userid for the key field, you have to set $db_key_track = 0.

You obviously are still having some sort of problem with your key fields, since the record isn't being found.

You may need to start over with a blank database again. Try doing that and seeing if the problem is fixed. If not, copy your html.pl file and default.cfg file to a web-accessible directory (one where you would place html files) and rename them so they have a .txt extension. Then let me know where they are and I'll take a look.

But start with a blank database first.

------------------
JPD





Quote Reply
Re: Modify Record Problem In reply to
I did as you suggested and cleared the default.db file and set the $db_key_track to 0 which was set to one.

All for naught... Everything is working great with the exception of the modify. I can click on the link from the short listing and it takes me to the long listing so it has to be seeing the Userid somewhere just not in the modify.

You can view the the default.cfg and html.pl files as default_cfg.txt and html_pl.txt at http://lbds.com/xxxx.txt This is for an adult website matchmaker type thing I am building for a customer so don't pay any attention to the content Smile
Quote Reply
Re: Modify Record Problem In reply to
You're missing a field in sub html_record_form for "Userid".

Just after print qq|{/b] add

<input type="hidden" name="Userid" value="$rec{'Userid'}">



------------------
JPD





Quote Reply
Re: Modify Record Problem In reply to
Maybe I am taking you to literally but I looked and did a search for..

print qq|{/b]

and was unable to locate it in the html.pl file to add the..

<input type="hidden" name="Userid" value="$rec{'Userid'}"> statement. did you mean to add it another <tr><td> with the hidden field in it??

Sorry to be so daft but it has been a long day.
Quote Reply
Re: Modify Record Problem In reply to
Well I experimented after my last post and placed the entry below

<input type="hidden" name="Userid" value="$rec{'Userid'}">

as the first line in a tr td enclosure in the html_record_form section of the html.pl file and everything seems to work.. Hopefully it was the right thing to do Smile Let me know if it wasn't..

Quote Reply
Re: Modify Record Problem In reply to
It really doesn't matter where you put hidden fields. They can be before the table tag, between rows -- </tr><inputtype="hidden ...><tr> -- on top of other rows, in the middle of cells with other input fields -- wherever you want them. They just have to be somewhere in the form.


------------------
JPD