CreateObject produces Cast Error

  • Thread starter Thread starter Steve S
  • Start date Start date
S

Steve S

We have begun to migrate our applications over to XP.... our components
run just fine under 2000... but when we put the code on a XP based
machine... and request for it to talk to a 2000AS based server for it's
objects.... we get an INVALID CAST error....

When we pull the 2000AS server out of the line-up... and run all the
components on the XP box.... things run
fine..... almost like the XP box doesn't want to talk nice to the 2000AS
server....

Any ideas out there.... or experience with this type of error/behaviour ?

TIA
 
Dim tbo As New BO_ECOBASE.Reports

tbo = createobject("BO_ECOBASE.Reports","MYSERVER")

The error occurs on the CREATEOBJECT line....... I have tried to include a
CTYPE command with the same results.......
 
Since you are making a new instance of the: BO_ECOBASE.Reports class with
the line:

Dim tbo As New BO_ECOBASE.Reports

What are you trying to do with:

tbo = createobject("BO_ECOBASE.Reports","MYSERVER")

At this point, tbo is already an instance of the class.
 
Sorry about that error..... ignore the NEW statement on the DIM
line....... when you asked for code... I pulled other code from a
different project...... as the lines are straight forward... and work
just fine as long as I don't try to create on the other box...... the
actual code is at work... and I wanted to get the question out there
ASAP...

What I should mention is this is FW 1.1 VS 2003.... while the FW was
installed off of MSDN... the FW and VS on the XP box was installed off of
a different set of CDs.... and XP does have a prior version of FW built
into the OS....

This morning I am going to try to build with the XP box, deploy to the
server... and see if it will run... just to eliminate any potential issues
with compilers
 
Back
Top