Been racking my brain on this one and can't see the problem.
Working on two databases, I'm sucessfully using JPDeni's switch working on the first of my databases. With sub html_add specifying db=first and, in sub html_record_form, switching to the second database to check a value which all works fine.
But working on the second database, with sub html_add_second (which specifies db=second and calls on sub html_record_form_second) while the page displays fine and the debug info confirms I'm working on the second database, the switch (which seems to be defined correctly) gives me an empty field value for all fields I've tested.
Here, I've got:
&switch_to_first;
%rec3 = &get_record($rec{'UserID'});
&switch_to_second;
and db.cgi includes:
sub switch_to_first {
@db_cols = qw(UserID ApproveDisplay AbbreviatedName [etc -- all other field names listed]);
$db_file_name = $db_database_path . "/first.db";
$db_key_pos = 0;
}
sub switch_to_second {
@db_cols = qw(UserID RecordID [etc. all field names specified]);
$db_file_name = $db_database_path . "/second.db";
}
------------------
WYSIWYG
Regn # 1718-00-DB
[This message has been edited by WYSIWYG (edited February 13, 2000).]
Working on two databases, I'm sucessfully using JPDeni's switch working on the first of my databases. With sub html_add specifying db=first and, in sub html_record_form, switching to the second database to check a value which all works fine.
But working on the second database, with sub html_add_second (which specifies db=second and calls on sub html_record_form_second) while the page displays fine and the debug info confirms I'm working on the second database, the switch (which seems to be defined correctly) gives me an empty field value for all fields I've tested.
Here, I've got:
&switch_to_first;
%rec3 = &get_record($rec{'UserID'});
&switch_to_second;
and db.cgi includes:
sub switch_to_first {
@db_cols = qw(UserID ApproveDisplay AbbreviatedName [etc -- all other field names listed]);
$db_file_name = $db_database_path . "/first.db";
$db_key_pos = 0;
}
sub switch_to_second {
@db_cols = qw(UserID RecordID [etc. all field names specified]);
$db_file_name = $db_database_path . "/second.db";
}
------------------
WYSIWYG
Regn # 1718-00-DB
[This message has been edited by WYSIWYG (edited February 13, 2000).]