amolero
18th November 2010, 15:23
Hi buddies, i have a problem when i want to create a new baan4.application object, VB6 return to me the next message: "An Active X component can't create object"

this is a little piece of the code:
"Set oBaaNCliente = CreateObject("Baan4.Application." & cUSERNAME)" where cUSERNAME is "BSP"
Any suggestion?:)

Note: In some computers the application work well

mark_h
18th November 2010, 17:40
So - some computers this works without a problem and some it doesn't - correct? Have you compared registry entries(and bwc configuration) between one that works and one that doesn't? That is about all on know on this subject. I have never used this functionality in production or on any machine besides my own, so I won't be much help.

amolero
19th November 2010, 09:44
yes, in some computers doesn't work... i checked the next entries in the registry:
-HKEY_CLASSES_ROOT\TypeLib\{00000001-4000-11ce-AAA8-00608C50C597}\1.1\0\win32
-HKEY_CLASSES_ROOT\TypeLib\{00000001-4000-11ce-AAA8-00608C50C597}\1.1\9\win32

and the only different is the path of bw.tlb file
then, what routes should I check?
Thanks for you reply :D

amolero
19th November 2010, 11:47
Hi buddies, i solved a portion of the problem...I've gotten to create the object without problem, but when i execute the query in the object, he returned the value 50


cFUNCION = "crear.orden.venta(" & Chr(34) & cCliente & Chr(34) & "," & Chr(34) & cDIRECCION_ENTREGA & Chr(34) & "," & _
BDate(dFECHA_CREACION) & "," & _
BDate(dFECHA_SALIDA) & "," & _
BDate(dFECHA_ENTREGA) & "," & _
Chr(34) & cOFERTA & Chr(34) & ")"

oBaaNCliente.ParseExecFunction "otdslsf4101m000", cFUNCION
lORNO = oBaaNCliente.ReturnValue


Note:
To solve the problem with CreateObject, I manually patched the registry with the next values
Step1

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Baan4.Application.bsp]

[HKEY_CLASSES_ROOT\Baan4.Application.bsp\CLSID]
@="{92D880DC-6356-487C-9F7B-5384F4F4EE2E}"


Step2

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{92D880DC-6356-487C-9F7B-5384F4F4EE2E}]

[HKEY_CLASSES_ROOT\CLSID\{92D880DC-6356-487C-9F7B-5384F4F4EE2E}\InprocHandler32]
@="ole32.dll"

[HKEY_CLASSES_ROOT\CLSID\{92D880DC-6356-487C-9F7B-5384F4F4EE2E}\LocalServer32]
@="C:\\Archivos de programa\\Baan\\Baan IV\\BIN\\BW.EXE /Automation \"C:\\Archivos de programa\\Baan\\Baan IV\\lib\\user\\bsp.bwc\""

[HKEY_CLASSES_ROOT\CLSID\{92D880DC-6356-487C-9F7B-5384F4F4EE2E}\ProgID]
@="Baan4.Application.bsp"


Any suggestion?

Thanks :D

mark_h
19th November 2010, 15:11
Well the only thing I can think of is to put that library in debug mode and step through it. There must be something happening in it that is returning the error code.