This is where our employees will post random tips and suggestions as well as observations from time-to-time. We try to make these postings as helpful as possible, so if you have any suggestions or corrections, please email us.
5/13/2010 Terminal Server 2008 x64 Bit
"File is in Use"
We have a client that is running a 32-Bit application that recently upgraded to Windows Terminal Server 2008 64-Bit. The application ran okay in tests with 3-4 users running the application in different sessions. However, once they moved the rest of the users to this server, most of them were unable to run the application. The first 3 to 6 users that started the application were okay, but subsequent ones were blocked out. Luckily this application is configured with a launcher application that is only 64K that calls other applications. Only the initial launcher application was being blocked. We found that we were able to copy the launcher and the other users were able to start the system using this copy.
However, after 3 to 6 users started the copy of the launcher, they also started being blocked. This appears to be a problem with how Windows creates a virtual 32-Bit environment on the 64-bit OS. Windows appears to share the files and/or file handles between different sessions of the 32-Bit virtual environment.
The brute-force work around for this was to create a seperate launcher application for each user.
5/5/2010 Passing of a friend
Our beloved mascot Atlas (for whom this blog is named) passed away today. He was 11 years old and will be sorely missed.
4/18/2007 CDO Error Error Messages: "Server Response: 550.5.7.1 Unable to relay for" and "Server Response not available"
We ran into these errors trying to send emails using CDO using Foxpro. We found that these errors were because the SMTP server we were connecting to required authentication. When sending email in Outlook, this is set using "My outgoing server (SMTP) requires authentication". However, in CDO, you must send the SMTP account and password.
Some SMTP servers may also require SSL. In Outlook, this is the setting "This server requires an encrypted connection (SSL)". The following link shows a code example for both scenarios.
Example Code
2/7/2007 MSMAPI Error Error Message: OLE IDispatch exception code 0 from MAPIMessages: Unspecified Failure has occurred.
We were trying to send emails with only a subject line and an attachment. However, it appears that MAPI requires the message to have a body as well. Trying to send a message without a body generated the error above.
10/12/2006 MSMAPI Error Error Message: OLE Error Code 0x80040112 - Class is not licensed for use
We ran into this error trying to run the command:
loSession = CREATEOBJECT( "MSMAPI.MAPISession" )
We had used this command on several other computers that had Outlook Express installed and never had a problem. This installation of Outlook Express appeared to be no different. The MSMAPI32.OCX was in place and appeared to have the correct license information in the registry. After some fustration, we went looking for a work-around. We found several Internet posts that sugested adding the ActiveX controls onto a form or class, instead of calling the control directly. This worked, but one word of caution, when you add the control to a form, we found that you must be on a computer that doesn't have the problem above or you won't be able to add the ActiveX controls. However, once the controls have been subclassed, they can be used on the "non-licensed" computer.
7/5/2005 Foxpro - Adding a backslash ("\") into a listbox In Microsoft's help, they state that if you need to show a backslash in a listbox or combobox, you must enter it as two backslashes "\\". So if you wanted to show the printer "\\Mycomputer\Myprinter", you would have to enter this as "\\\\MyComputer\\MyPrinter". However, in testing this in VFP8, this advice does not work. I am using a RowSourceType of "ARRAY" for a Combobox. The resulting line shows as disabled with the following text "\\\MyComputer\\MyPrinter".
I found a work around for this. If I enter the text as " \\MyComputer\MPrinter" and place a space as the first character, the line will show correctly in the list.
4/14/2005 More on Foxpro Datasession I did more testing on the Foxpro Datasession problems. What I found is that Foxpro can get confused and the results are not always consistent. First I tested the code sample submitted earlier for class types other than "Custom". What I found was that it did not matter what class type you choose, Foxpro will try to "protect" the datasession of the calling object. So if you change the datasession in a child object (non-private datasession), the datasession changes back when control is returned to the calling object. I would expect this behavior if the object type was "Session" or if private data sessions had been set. However, in all other scenarios, I would expect a procedure called in another object to have the same results as a call to a stand-alone procedure. However, this is not the case
One other strange result that I found is that Foxpro can get confused on how it maintains the "correct" datasession. In our framework, we instantiate an object of type "Custom". Within this parent object, we instantiate objects of type "Form", "Session", and "Custom". After the "Session" object is created, we change the datasession for our parent object from DataSession = 1 to DataSession =2. While the form is displayed, we have code that will process the Esc key and run code to release all of the objects above. Just before we destroy these objects, we set the Datasession = 1. I then have DEBUGOUT code that shows the datasession is equal to one throughout the release process. However when running the code the first time, after the release, the datasession will flip back to Datasession = 2. However, I can run the same code 100 more times, the datasession will stay on Datasession = 1 after the release.
Some have suggested that Foxpro may be trying to flip the datasession back because there are unprocessed records. However, I disproved this by running the code without handling any data.
|