SAS IOM - Programming with Visual Basic

Reply
Frequent Contributor
Posts: 75

SAS IOM - Programming with Visual Basic

I was going through couple of articles on how to connect to SAS from VB. I found two different methods to achieve the same.

Can anyone help me to understand what is the difference between connecting using SASWorkspaceManager and SASObjectManager.

Dim obWSMgr As New SASWorkspaceManager.WorkspaceManager

Dim obWS As SAS.Workspace

Dim errString As String

Set obWS = obWSMgr.Workspaces.CreateWorkspaceByServer("My workspace", VisibilityNone, Nothing, "", "", errString)

Debug.print obWS.Utilities.HostSystem.DNSName

ObWS.Close

Dim obObjectFactory As New SASObjectManager.ObjectFactory

Dim obSAS As SAS.Workspace

Set obSAS= obObjectFactory.CreateObjectByServer("", True, Nothing, "", "")

Debug.print obSAS.Utilities.HostSystem.DNSName

ObSAS.Close

Trusted Advisor
Posts: 3,215

Re: SAS IOM - Programming with Visual Basic

If you are asking for concepts.....

There is a sas metadata server with a metadata base. 

You can start a process from there. Appserver with underlying workspace servers are part of that.

You do not need a metadata server when you have a running object spawner that one will manage the appservers with underlying workspace servers.

As you not always using a server managed approach but also your desktop the classic sas usage is also offered as a local workspace service ugh workspace server.

---->-- ja karman --<-----
Super Contributor
Posts: 441

Re: SAS IOM - Programming with Visual Basic

Using the Object Manager gives you some more options than when you are using the Workspace Manager, particularly if you're connecting to a Metadata Server. If you're just using a Local Workspace session without a Metadata Server then to be honest there's probably not much difference - at the end of the day both will give you a SAS Workspace session.

You might find this link helpful SAS(R) 9.4 Integration Technologies: Windows Client Developer's Guide

Ask a Question
Discussion stats
  • 2 replies
  • 280 views
  • 0 likes
  • 3 in conversation