Hi there,
we have two SQL servers: Live and Test. When I switch between these servers using the Open Database dialog the list of available databases that pops up when you press the LookUp button in the Database Name field doesn't refresh but always shows the available databases on the server you currently connected to. I can log in when I type the name manually.
So I have to type in the Server Name manualy. Is it possible to change this?
And I also have to type in the Database Name manually. This is a new problem. What can cause this?
Thanks in advance.
Regards Max
0
Comments
tnx you triggered me.
I recently added this code to Codeunit 1:
CompanyOpen()
IF GUIALLOWED THEN
LogInStart;
ShowDBName; //My line off code
Function:
ShowDBName()
LRecDatabase.RESET;
LRecDatabase.SETRANGE("My Database",TRUE);
LRecDatabase.FINDFIRST;
IF (STRPOS(LRecDatabase."Database Name",'ACC') > 0) OR
(STRPOS(LRecDatabase."Database Name",'TEST') > 0 ) THEN
MESSAGE('!!! ' + LRecDatabase."Database Name" + ' !!!');
I removed the code and my problem is solved. Apparently the usage of the Database Table Record Variable causes the problem. I tried using a RESET and a CLEAR. But this doesn't solve my problem.
I removed the code from C1.
Regards Max
You may be able to do a little workaround for your scenario - try moving the function into a separate codeunit (one which isn't single instance like CU1) and it may work. Worth a try anyway.
Regards
Kishor