I got it working by combining the two databases. And even better i dont have to use the wordpress classes my config file works and i am able to use some plain ole php (mysql_query() etc etc) to get the data i need.
I could try adding the tables to the same database. I’d need to read up more on wordpress classes. This is my first time using wordpress and of course i had to make life hard for myself by doing things awkwardly.
thanks for the suggestion MichaelH i will create a local backup of the databases and see if i can get something working.