×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

CreateObject & ole error code 0x80020006
2

CreateObject & ole error code 0x80020006

CreateObject & ole error code 0x80020006

(OP)
Hello,
I encounter the following problem with the following code:

CODE -->

lRsp=.T.
oDude=CREATEOBJECT('dude.CFD_DUDE')
IF !lRsp
	?? CHR(7)
	WAIT ' Nu s-a reusit instantierea driverului casei de marcat ! ' ;
		WINDOW TIMEOUT 3
ENDIF
ON ERROR
	*	conectare casa de marcat
	nErr=oDude.open_Conection()    && **
	IF nErr#0
		=CodErr(nErr)
	ENDIF
WAIT ' Astept ... ' WINDOW TIMEOUT 25

=oDude.close_Connection() 


commands running in the VFP environment but in a prg file do not load the related functions and procedures
the oddity is like the step-by-step execution in the debugger, after we loaded the object, the functions are not visible but switching in the visual environment these are accessible
how can I solve the problem?

** ole error code 0x80020006: Unknown name.

The code was tested in Vfp 8.0, Vfp 8.0 SP1, Vfp 9.0
SO Win.8.1

RE: CreateObject & ole error code 0x80020006

Euuu,

Knowing anything at all about the class you're using, I'll stick to the obvious: oDude.open_Connection() instead of oDude.open_Conection().

RE: CreateObject & ole error code 0x80020006

Dan might well be right.

You could try doing the CREATEOBJECT() in the Command Window. Then, still in the Command Window, type oDude followed by a dot. Intellisense will then tell you exactly which methods are available, and also what parameters to pass to those methods (if any).

By the way, the block of code beginning IF !lRsp seems to be redundant. If I've understood it right, it will never be executed. But that doesn't affect your main problem.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: CreateObject & ole error code 0x80020006

(OP)
Mike, sorry
I forgot the instruction
ON ERROR lRsp=.F.

sorry for my English but I will repeat the steps you follow
1. Activate the debugger
2. execute step by step instructions
3. On the error message, tap Suspend
4. Activate the command window and check the properties and methods of the oDude object where all of them appear
5. In the debuggger, the Locals window, the oDude object shows only the properties
in conclusion, I can not use the object's methods oDude both in a prg and exe :(

RE: CreateObject & ole error code 0x80020006

Have you tried changing from oDude.open_conection() to oDude.open_connection()?

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: CreateObject & ole error code 0x80020006

I agree. Since close_Connection has two Cs (in your second picture and also in your code snippet), then it's likely that open_Connection has as well.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: CreateObject & ole error code 0x80020006

Two Ns Mike

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: CreateObject & ole error code 0x80020006

(OP)
Have you tried changing from oDude.open_conection() to oDude.open_connection()?
Thank you,
that was the problem
I still received another error code, but I am already in the situation

two days lost for a typing mistake,
sorry :(

thank everyone for your attention

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close