Gene,
I would begin by eliminating UniObjects from the suspects.
The easiest way is to write a short vbscript routine. If you don't already
know how to do this (you probably do) create it in notepad and give it a VBS
extension, and you should be able to double click on it to run it. If not,
type WSCRIPT filename.vbs.
The script below will check that objects will instantiate and connect
correctly.
Dim UV
If DoConnection() = False Then
Msgbox "Could not connect"
Else
Msgbox "Connected to server"
ReadFromVOC
End If
Function DoConnection()
Dim HostName
Dim UserName
Dim AccountPath
Dim Password
'=============================
' Set the host name, user name and account path to your system
'=============================
HostName = "myhostname"
UserName = "myuser"
AccountPath = "uv"
Password = InputBox("Password for " & UserName & " on " & HostName)
IsUniData = False
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
' not all versions of objects support this - you may need to comment this in
or out.
'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
' try each of the names that have been given to the various versions of
Objects ...
Set UV = CreateObject("UniObjects.UnioaifCtrl.1")
If (Err <> False) Or (UV Is Nothing) Then
Err = False
Set UV = CreateObjects("uniobjects.session.1")
If (Err <> False) Or (UV Is Nothing) Then
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 ReadFromVOC
Dim VOC
Set VOC = uv.OpenFile("VOC")
VOC.RecordId = "LIST"
VOC.Read
Msgbox VOC.Record
End Sub
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Gene W. McDonald
Sent: 04 February 2004 14:23
To: U2 Users Discussion List
Subject: RE: COM Exception
I am sorry... I am using Uniobjects and the code is written in Visual Basic,
VB.Net is would say is more appropriate.
-----Original Message-----
From: Brian Leach [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 04, 2004 8:15 AM
To: 'U2 Users Discussion List'
Subject: RE: COM Exception
Gene,
More information needed, I'm afraid.
What are you actually using to access UniVerse: is it UniObjects, UniOjbects
for Java, ODBC, OleDB ?
Brian Leach
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Gene W. McDonald
Sent: 04 February 2004 13:55
To: [EMAIL PROTECTED]
Subject: COM Exception
I am new to the list and I have search the archives without finding a
result. SO I apologize, in advance, if this is 'old hat' for some of you. I
am in a situation where we are moving from D3 to Universe. I have written a
VB.Net application which will interact with D3 or with Universe depending
upon the value of a switch. I have been successful in setting up the
application to run in a distributed environment (forgive me if that is the
wrong term, the executable and the supporting dll's reside in a centralized
drive on the server and are accessed by the users via a shortcut. The
intention being that when I make mods to the executable I do not have to
reditribute it to each user PC). ANyway, the application runs fine when
accessing the D3 server, but when I try to access the Universe server, I get
the following error:
System.Runtime.InteropServices.COM exception (0x80040154): COM object with
CLSID {blah blah blah} is either not valid or not registered.
at ISOComplaintLog.ISOForm.Connect_To_UV()
at ISOComplaintLog.ISOForm.Build_Employee_List_UV()
at ISOComplaintLog.ISOForm..ctor()
Does anyone have any suggestions or ideas?
Thanks,
Gene
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
________________________________________________________________________
This email was checked by MessageLabs SkyScan before entering Microgen.
________________________________________________________________________
This email was checked on leaving Microgen for viruses, similar malicious
code and inappropriate content by MessageLabs SkyScan.
DISCLAIMER
This email and any attachments are confidential and may also be privileged.
If you are not the named recipient, please notify the sender immediately and
do not disclose the contents to any other person, use it for any purpose, or
store or copy the information.
In the event of any technical difficulty with this email, please contact the
sender or [EMAIL PROTECTED]
Microgen Information Management Solutions http://www.microgen.co.uk
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
________________________________________________________________________
This email was checked by MessageLabs SkyScan before entering Microgen.
________________________________________________________________________
This email was checked on leaving Microgen for viruses, similar
malicious code and inappropriate content by MessageLabs SkyScan.
DISCLAIMER
This email and any attachments are confidential and may also be
privileged.
If you are not the named recipient, please notify the sender
immediately and do not disclose the contents to any other
person, use it for any purpose, or store or copy the information.
In the event of any technical difficulty with this email, please
contact the sender or [EMAIL PROTECTED]
Microgen Information Management Solutions
http://www.microgen.co.uk
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users