Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CreateObject & ole error code 0x80020006 2

Status
Not open for further replies.

Euuu

Programmer
Jun 16, 2002
4
RO
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
	[COLOR=#EF2929]nErr=oDude.open_Conection()[/color]    && **
	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
 
Euuu,

Knowing anything at all about the class you're using, I'll stick to the obvious: [tt]oDude.open_Co[highlight #EDD400]n[/highlight]nection()[/tt] instead of [tt]oDude.open_Conection()[/tt].
 
Dan might well be right.

You could try doing the [tt]CREATEOBJECT()[/tt] in the Command Window. Then, still in the Command Window, type [tt]oDude[/tt] 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 [tt]IF !lRsp[/tt] 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
 
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 :(
 
 https://files.engineering.com/getfile.aspx?folder=65e3f129-b4a7-4e7a-8b41-e916febf0936&file=D_debugger.jpg
Two Ns Mike

Regards

Griff
Keep [Smile]ing

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.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top