I have two almost idental DB’s on different SQL instances. They are on separate servers with each company using the exact same application, just installed in different locations.
One install is continuing to be operational, the other is now for reference but I still need to be able to access the data, ideally through the remaining application.
I’ve copied the (identical) file structures in the dictionary and given them a different Owner name and label to the second instance. This appears to work well and I can open the two databases and view the two identical files in the different MS SQL instances using the different table labels.
The opening of the old location DB with the different label opens the connection and ( can do a manual ‘Get’ to the old DB without any problem.
The issue that I’m struggling with is with T-SQL calls.
So… in short code it looks like this :
Two identical tables
Orders (Owner name = current location)
Orders (Owner name = Old location)
I can ‘Send’ a Select statement to the SQLFile (with an explicit ‘Use Old database’ statement that I have defined (as I do with all other hand written calls) and it returns no SQL errors, but neither does it return any data to the SQL file.
SQL Call looks like this :
Sendstring = ‘USE [Olddatabase] select * from Orders where…’
SQLFile{Prop:SQL}=CLIP(SendString)
This does not return any errors and is identical to all other calls that I make in the App… with the exception of the changed DB info.
When I try to read back from the SQLFile I get the message :
‘Connection is busy with results for another hstmt’.
There is no processing or other calls to either DB anywhere in the App at this point.
So my questions are…
Is there anything obvious that I’m doing wrong ? Is my methodology fundamantally flawed ?
Should the definition of the SQLfile be in the old database or the current ? I’m presuming current but I’m struggling for answers.