Gossamer Forum
Home : Products : DBMan : Customization :

Multi database: modify error

Quote Reply
Multi database: modify error
I've followed JP Deni's mod for multiple databases.

On trying to modify a record in either the main "user" database and a second "transaction" database, I'm getting the modify failure page with the error "can't find requested record".

In working with each database, the debug info confirms that I've got the correct setup and database files. And each form is filled out with the single record. But modify_record doesn't pick out the record for editing.

I've re-read JP Deni's guidance notes and several threads on the subject, but can't see what I've missed out. Is there a straightforward solution?

------------------
WYSIWYG

Regn # 1718-00-DB

[This message has been edited by WYSIWYG (edited February 06, 2000).]
Quote Reply
Re: Multi database: modify error In reply to
You do have separate modify routines for each database, right?

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Multi database: modify error In reply to
Thanks, Eliot. And your reply beat my editing of the original post!

I have separate routines in the html.pl, but not for modify_record in the main db.cgi. Do I need two of the latter?

------------------
WYSIWYG

Regn # 1718-00-DB
Quote Reply
Re: Multi database: modify error In reply to
No...But make sure that you calling the correct database in your html_modify_search and the other sub-routine that you have for modifying the other database.

You should use:

Code:
<input type="db" value="nameofdatabase">

Replace the nameofdatbase with the name of your database files.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Multi database: modify error In reply to
Ah! Some of these db values are still set as "$db_setup". Will now correct -- thanks a million.

I'd really appreciate it if you could look at a related question in:
http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/002043.html

Thanks.

------------------
WYSIWYG

Regn # 1718-00-DB
Quote Reply
Re: Multi database: modify error In reply to
I looked at the other Thread you created, and I need more time to digest exactly what you are trying to accomplish.

Sorry.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Multi database: modify error In reply to
That's fine.

I've made the changes to the db values. Yet I'm still getting the same modify error.

------------------
WYSIWYG

Regn # 1718-00-DB

[This message has been edited by WYSIWYG (edited February 12, 2000).]
Quote Reply
Re: Multi database: modify error In reply to
You do not need to create separate modify_record routines in db.cgi, but you do need to call the separate sub-routines in the elsif statements in the sub main routine in the db.cgi script.

Make sense now? I sure hope so.

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------









Quote Reply
Re: Multi database: modify error In reply to
I've looked through related threads in the past week and revisisted the scripts I'm working on. Racking my brains, I can't see why everything works fine in adding records to the "parent" services database and the "subsidiary" 101 database but that attempts to modify records in BOTH databases fail to find the requested record. I've walked through the sequence of sub-routines for each database and I don't see anything wrong.

Is it OK that I've got the User ID in field 0 common to both databases and as the $db_key for each? Does my modify_record need tweaking to help it find the right database? Or have I still got problems in the modify sub-routines? I'd really appreciate your input as I'm working to a tight deadline on this.

Thanks.

------------------
WYSIWYG

Regn # 1718-00-DB

[This message has been edited by WYSIWYG (edited February 12, 2000).]
Quote Reply
Re: Multi database: modify error In reply to
Is it OK that I've got the User ID in field 0 common to both databases and as the $db_key for each?

YES

Does my modify_record need tweaking to help it find the right database?

Again, you need separate sub-routines for each database. You can not use the same modify_record routines for each database. You will have to re-write some sections of the db.cgi to call certain database routines in the html.pl file.

Or have I still got problems in the modify sub-routines?

Probably...

Tight deadline....

It is not our problem that you waited to the last minute.

Wink

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------









Quote Reply
Re: Multi database: modify error In reply to
Eliot,
Thanks for your quick response.
Can I just ask for clarification on one point on which I'm confused. I appreciate that html.pl must have separate html_add..., html_modify_... sub-routines for each database. And that the sub-routine main in db.cgi must call the particular routine corresponding to the database. Can you please confirm that I DO NOT have to make separate sub-routines for modify_record in db.cgi -- i.e. that just one version of this subroutine will work for all databases.

------------------
WYSIWYG

Regn # 1718-00-DB
Quote Reply
Re: Multi database: modify error In reply to
Thanks again. I think I've solved this now, subject to comfort that I've not done anything silly! Details are at:

http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/002149.html
Quote Reply
Re: Multi database: modify error In reply to
You're welcome.

Regards,

------------------
Eliot Lee....
* Check Resource Center
* Search Forums

Quote Reply
Re: Multi database: modify error In reply to
Am I losing it completely??!!

I thought I'd got rid of "modify error -- can't find the requested record" which cropped up out of sub modify_record. But it dropped out when editing my secondary database only. It still crops up with the primary database.

So I've re-written the db.cgi and html.pl files from scratch -- WITH ONLY one database. And would you believe it, I'm still hitting the error.

I've made no substantive changes to the scripts (taken from a fully working version). The only distinction is that I'm using a differently named db.cgi and a database in a different location than before. Everything is specified correctly in the .cfg file -- indeed, modify_record is obviously finding the database, but not the record concerned.

Any bright ideas?

PS. I don't think there's anything up with the scripts, but they are available as text files at http://www.globalcustody.net/read/

[This message has been edited by WYSIWYG (edited February 27, 2000).]