2012-11-26 19 views
5

kullanarak bir çalışma alanı oturumu oluşturma Excel VBA kullanarak bir çalışma alanı sunucusuna bağlanmaya çalışıyorum. this page hakkında bilgi kullanarak, ürettiler aşağıdadır:SAS IOM ve VBA

Dim obSAS As SAS.Workspace 
Dim obWorkspaceManager As New SASWorkspaceManager.WorkspaceManager 
Private Sub Form_Load() 
    Dim obConnection As New ADODB.Connection 
    Dim obRecordSet As New ADODB.Recordset 
    Dim obServerDef As New SASWorkspaceManager.ServerDef 
    Dim xmlString As String 
    obServerDef.Port = 28561 
    obServerDef.Protocol = ProtocolBridge 
    obServerDef.MachineDNSName = "blah.server.com" 
    Set obSAS = obWorkspaceManager.Workspaces.CreateWorkspaceByServer("Ref", _ 
     VisibilityProcess, obServerDef, "[email protected]","MyPass", xmlStr) 
end sub 

ilk olarak cevabım bu:

yüzden çalışma alanı sunucuda işaret etmek port numarasını güncellenmiş
<xml id="combridgeOutput"><connectionAttempts><connectionAttempt> 
    <sasserver></sasserver> 
    <sasmachinednsname>blah.server.com</sasmachinednsname> 
    <sasport>28561</sasport> 
    <saslogin>[email protected]</saslogin> 
    <status>0x80041001</status> 
    <description><Exceptions><Exception> 
    <SASMessage severity="Error"> 
    The client has connected to a SAS (9.2) Metadata Server (v1.0) when 
    it intended to connect to a SAS Workspace Server. 
    </SASMessage> 
    </Exception></Exceptions></description> 
</connectionAttempt></connectionAttempts></xml> 

ve şimdi bu olsun :

<same XML tags as above > 
    <SASMessage severity="Error"> 
    Client [email protected] does not have permission to use server 
    SASMeta - Workspace Server (A5DPDN69.AV000069). 
    </SASMessage> 

Bu alıştırma için özel izinler ayarlamak istemez. VBA bir SAS çalışma alanı sunucusu oturumuna başka nasıl bağlanabilir?

cevap

3

Doh! Yanlış makine adını kullanıyordum. Referans için, doğru makine adını almak için işlem burada! SMC'sine

  1. Log
  2. Expand Sunucu Yöneticisi
  3. SASApp Expand
  4. SASApp Expand - Mantıksal Çalışma Alanı Sunucusu Orada

Doğru makineyi göreceksiniz ve ayrıca liman ayrıntılarını gösterecektir ..