Any thoughts as to what to check to fix this, I used to be able to connect
from the P.C. but not now, I can connect using UniAdmin but not other
programmes, the following vbs code gives error 39207 when trying to connect :
Dim UV If DoConnection() = False Then
Msgbox "Could not connect"
Else
Msgbox "Connected to server"
ReadFromVOC
ShowTTY
DoSelect
End If Function DoConnection()
Dim HostName
Dim UserName
Dim AccountPath
Dim Password '=============================
' Set the host name, user name and account path to your system
' Set IsUniData to True or False
' NOTE That the password is echoed back as plain text.
'=============================
HostName = ""
UserName = ""
AccountPath = ""
Password = InputBox("Password for " & UserName & " on " & HostName)
IsUniData = True
If CreateSession() = False Then
Msgbox "Could not create session"
DoConnection = False
Exit Function
End If UV.HostName = HostName
UV.UserName = UserName
UV.AccountPath = AccountPath
UV.Password = Password
If IsUniData Then
UV.DatabaseType = 2
'Else
'UV.DatabaseType = 1
End If UV.Connect
If UV.Error <> False Then
Msgbox "Error returned from connect = " & UV.Error
DoConnection = False
Exit Function
Else
DoConnection = True
End If End Function Function CreateSession()
On Error Resume Next
Err = False
CreateSession = True
' Msgbox "Trying UniObjects Unioaif name"
Set UV = CreateObject("UniObjects.UnioaifCtrl.1")
If (Err <> False) Or (UV Is Nothing) Then
' Msgbox "Trying UniObjects name" Err = False
Set UV = CreateObjects("uniobjects.session.1")
If (Err <> False) Or (UV Is Nothing) Then
' Msgbox "Trying uv Objects name" Err = False
Set UV = CreateObject("universe.session.1")
If (Err <> False) Or (UV Is Nothing) Then
CreateSession = False
End If
End If
End If
End Function Sub DoSelect
uv.Command.Text = "SELECT VOC"
uv.Command.Exec
Msgbox uv.GetAtVariable(8)
End Sub Sub ReadFromVOC
Dim VOC Set VOC = uv.OpenFile("VOC")
VOC.RecordId = "LIST"
VOC.Read
Msgbox VOC.Record
End Sub Sub ShowTty
uv.Command.Text = "WHO"
uv.Command.Exec
Msgbox uv.Command.Response
End SUb RegardsJonathan Leckie
**********************************************************
* This message has been scanned for viruses and dangerous content
* and is believed to be clean.
*
* This email and any files transmitted with it are confidential and
* intended solely for the use of the individual or entity to whom they
* are addressed.
*
* If you have received this email in error please notify us at Blairs,
* details can be found on our website http://www.blairswindows.co.uk
*
* Name & Registered Office:
*
* Blairs Windows Limited
* Registered office : 9 Baker Street, Greenock, PA15 4TU
* Company No: SC393935, V.A.T. registration No: 108729111
**********************************************************
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users