Thank you! I found out I was wrong about something. W - R - O - N - G ! ! ! ! About as wrong as I can get!!!!
Okay. I've got that out of my system.
In your "switch_to..." subroutines, you'll need to change the way they're set up.
Instead of
Code:
sub switch_to_agency {
#-----------------------------------------------------
@db_cols = qw('UserID' 'AgentID' 'Agent name' 'Agent address' 'Agent postcode' 'Agent telephone number' 'Agent fax number' 'Agent email address' 'Agent Invoice Address and Postcode');
$db_file_name = $db_script_path . "/agency.db";
}
use
Code:
sub switch_to_agency {
#-----------------------------------------------------
$cols = 'UserID,AgentID,Agent name,Agent address,Agent postcode,Agent telephone number,Agent fax number,Agent email address,Agent Invoice Address and Postcode';
@db_cols = split (/,/, $cols);
$db_file_name = $db_script_path . "/agency.db";
}
Do the same thing with the other ones. Change
@db_cols to
$cols, put single quotes around the whole list of field names, separate field names with just a comma and add a line
@db_cols = split (/,/, $cols);
after the field list.
In your switch_to_user subroutine, be sure you have all the fieldnames on one line, no matter how long it makes the line.
Give that a try and see how it works.
(Boy, I can't believe how wrong I was!!!)
------------------
JPD
[This message has been edited by JPDeni (edited April 25, 2000).]