SAS 9.1.3 Integration Technologies » Developer's Guide

Developing Windows Clients
Client Requirements
Client Installation
Selecting a Windows Programming Language
Programming with Visual Basic
Programming in the .NET Environment
Using VBScript
Programming with Visual C++
Using the Object Manager
Creating an Object
Object Manager Interfaces
Using a Metadata Server with the Object Manager
Metadata Configuration Files
Error Reporting
Code Samples
Using Connection Pooling
Choosing Integration Technologies or COM+ Pooling
Using Integration Technologies Pooling
Using Com+ Pooling
Pooling Samples
Using the IOM Data Provider
Using the Workspace Manager
Class Documentation
Windows Clients

SAS Object Manager Error Reporting

If a call succeeds in obtaining an object, the method returns S_OK. However, there are many reasons an error might occur. Sometimes an error might occur even before the connection attempt is made. An example of such an error follows:

  • Requested logical name was not found

Other errors can occur during the connection attempt. Examples include the following:

  • Invalid userid/password
  • Couldn't connect to a SAS server
  • Invalid hostname
  • Server configuration error

Errors can occur even though a successful connection is established. Errors that occur during connection can be reported through the logging mechanism. To enable logging, set the ObjectFactory.LogEnabled property to TRUE. When LogEnabled equals TRUE, both successful and failed connection attempts are recorded in the log. You can obtain error information by calling GetCreationLog as follows:


The parameters for GetCreationLog follow:

Indicates whether to erase all of the accumulated logging information. Values are TRUE or FALSE.
Indicates the threads for which to obtain connectionAttempts log information. The values for the allThreads parameter are
Obtain log information for your current thread.
Obtain log information for all threads in the process.

Error XML

The error information returned through XML allows applications to fix detected problems. Applications can be used to fix these errors by parsing the XML and possibly providing a user interface or sending a message to an administrator to have the errors fixed.

The following example is an output from GetCreationLog. The first attempt establishes an IOM Bridge connection to the SAS Metadata Server, and the second attempt establishes a COM connection to a workspace server. Note that the sasport and sasmachinednsname are not reported for COM connections.

         <sasserver>SAS Metadata Server</sasserver>
         <sasserver>myOtherMachineCOM - Workspace Server</sasserver>

The following error message shows a failed IOM Bridge connection attempt. Note that the port number, machine name, and login are listed for IOM Bridge connections.

         <description>Could not establish a connection to the SAS server on
            the requested machine. Verify that the SAS server has been
            started with the -objectserver option or that the SAS
            spawner has been started. Verify that the port Combridge is
            attempting to connect to is the same as the port SAS (or the
            spawner) is listening on.</description>
         <sasserver>myWorkspace - Workspace Server</sasserver>