Thanks for getting back to me. What I ended up doing was just reestablishing the connection to the wordpress database on pages that had multiple databases, just by using:
mysql_connect($server,$loginsql,$passsql);
@mysql_select_db($base) or die( “Unable to select database”);
I’m using the non WP database on many more pages than the wordpress database and it was less to change.