cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving COM Class factory for component with CLSID failed due error

Former Member
0 Kudos

Hello.

I am a new SDK developer and maybe I say something stupid but let's try.

I am using VB from Visual Studio 2008 and SAP Business One 2007 A (8.00.175).

Microsoft Sql 2005 data base is in a 2008 Windows Server.

I am trying to get some data from a table but, creating a recordset instance, system show me this error:

"Error al recuperar un generador de clases COM para el componente con CLSID {11FA87EF-9F44-4528-AE1D-DAF92AEA3545} debido al siguiente error: 80040111 (I suposse a good translation is "Retrieving COM Class factory for component with CLSID failed due error")".

This is the code (error appears on "new" statement):

rsOITM = New SAPbobsCOM.Recordset

rsOITM.DoQuery("SELECT * FROM OITM")

grdTabla.DataSource = rsOITM

I read somewhere about registry, about wrong dll versioon, ... I try all of this but nothing works.

I hope you can help me.

Thank you.

Regards from Spain.

Accepted Solutions (1)

Accepted Solutions (1)

former_member201110
Active Contributor
0 Kudos

Hi Luis,

Windows Server 2008 is not currently supported (at least, it wasn't last time I asked) but I have seen SBO running without errors in this environment, including DI API addons. I certainly wouldn't recommend you run Windows Server 2008 in a production environment until SAP have certified this platform.

Have you tried deleting the SM_OBS_DLL folder in your temp directory. Also, try uninstalling and reinstalling the DI API.

Incidentally, is your server 32 bit or 64 bit?

Kind Regards,

Owen

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Luis,

As Owen mentioned, Windows Server 2008 isn't officially supported yet so if possible I would avoid implementing any customers on it until it has been certifed.

However, the error you receive might actually be related to a known issue rather than your OS.

SAP Note 1090628 seems to be related to the issue you are encountering. In this case it was because the add-on was compiled in 64 bit and the solution is to recompile it in 32 bit. (The DI is not capable of running in 64 bit yet) There are plenty of articles on the net which will show you how to acheive this using your development environment.

Hope this is useful.

Regards,

Niall

SAP Business One Forums

Former Member
0 Kudos

Hello again.

Actually, my development environment is 2003 server (32 bits) and SAP Server and SQL Server is in 2008 server (64 bits).

So if I compile in 2003, can I get the same error trying to work with SQL Server in 2008?

The thing I do not understand is in the moment the error get shown, I do not even do anything yet, only instanciating an object from the dll (from 2003).

I'm going to try some compatibility before forget about mix both environments by now.

Thanks a lot to both.

Regards.

Former Member
0 Kudos

Hello.

I changed SAP and SQL Server into a 2003 Server, I desintalled and installed the DI API in my development environment and I get the same error.

Anyone knows what is happenning?

Thank you very much.

Former Member
0 Kudos

I belive grid datasourse always looks for datatable as a source, recordset not returns datatable, it returns only cursor. so we connnot assing dircty to grid datasource. you have to loop the data and build as a data table and then assign to your grid as a datasourse., hope it help you.

thanks

kv

Former Member
0 Kudos

I wish to prove what you are saying and have another problem, different if posible, two days with the same, but before using the recordset I would like to know why I cannot instanciate it.

After that, I will follow your advice, sure.

Somewhere I read about dll chains, one calling another, so it is not usefull registry one without the other ... of course I have registred SBObobsCOM2007.dll yet. I am getting lost ...

Thanks a lot, Venkat.

Former Member
0 Kudos

Well, I got the solution: I cannot initializate the record set that way (I suppose a class message it is not so difficult to indicate itbut...).

The correct way is

rsOITM = oCompany.GetBusinessObject(BoObjectTypes.BoRecordset)

Thanks you all.