LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX Controller Wizard - MS Access -Access_IID_Properties redifinition error

Hello,

I use the Tools -> Create ActiveX Controller Wizard to create the wrapper arount the 'Microsoft Access 11.0 Object Library'.

The creation fails with the following error message:
'The compile failed, the .obj file was not attached.'

The error window displays:
20807,33 Redefinition error of 'Access_IID_Properties' previously defined at access.c: 20467

As the declared values are different for the two definitions, I am blocked.

Could you please give me a hint what to do.

Regards
Roland BOES
0 Kudos
Message 1 of 9
(5,123 Views)
 

Hello Roland,

Did you follow the steps in the following article to create the ActiveX Controller?
Using the ActiveX Controller Wizard to Generate Code in LabWindows/CVI 

If that doesn't work when you try to create the controller in a new project, I would recommend checking that you can make calls to your Microsoft Access ActiveX server from another language to verify that it is functioning properly.  I hope that helps.

 
Regards,


Marty H.
National Instruments
0 Kudos
Message 2 of 9
(5,090 Views)
Roland,

I investigated the compile error you reported.  It is a combination of a somewhat unusual characteristic of the Access Object Library and an issue in CVI.

You should be able to remove the compile error by deleting the second definition of Access_IID_Properties (the one that starts with 0x29) and recompiling the instrument.  You can recompile the instrument by selecting Instrument >> Edit, choosing the Access instrument in the listbox, and selecting Reattach Program.  However, while investigating this issue I also uncovered a crash in CVI that occurs when compiling the generated Access instrument.  If you see this crash, you can reply to this thread and I can send you a copy of the compiled object file that you can use instead of compiling the instrument yourself.  The crash will be fixed in an upcoming maintenance release of CVI.

Let me know if you have any questions.

-Jeff
NI
Message 3 of 9
(5,057 Views)

Hello,

I try to select and update data to Microsoft access file(mdb).

then i follow the link which recomend to Active X controller

 Tools -> Create ActiveX Controller Wizard >> choose ActiveX sever which i have 2 choice of microsoft Access

 

I thing i have the same problem Microsoft Office 12.0 Access database engine Object Library

I use the Tools -> Create ActiveX Controller Wizard to create the wrapper arount the 'Microsoft Access 12.0 Object Library'.

The creation fails with the following error message:
'The compile failed, the .obj file was not attached.'

The error window displays:
20807,33 Redefinition error of 'Access_IID_Properties' previously defined at access.c: 20467

As the declared values are different for the two definitions, I am blocked.

0 Kudos
Message 4 of 9
(4,905 Views)

Hello,

I try to select and update data to Microsoft access file(mdb).

then i follow the link which recomend to Active X controller

 Tools -> Create ActiveX Controller Wizard >> choose ActiveX sever which i have 2 choice of microsoft Access

 

I thing i have the same problem Microsoft Office 12.0 Access database engine Object Library

I use the Tools -> Create ActiveX Controller Wizard to create the wrapper arount the 'Microsoft Access 12.0 Object Library'.

The creation fails with the following error message:
'The compile failed, the .obj file was not attached.'

The error window displays:
20807,33 Redefinition error of 'Access_IID_Properties' previously defined at access.c: 20467

As the declared values are different for the two definitions, I am blocked.

0 Kudos
Message 5 of 9
(4,905 Views)
Hello
Sorry the reply number 4-5 is my false, I just push wrong button so it come 2 reply. Monderator ,Could you please delete my 4-5 reply.
and this is the question i want to ask
 
I want to use labWindow CVI to select ,update the data from and to microsoft access database.
so i use
Tools -> Create ActiveX Controller Wizard-> choose the activeX sever
 but in my case i have
1.Microsoft Office 12.0 Access database engine Object Library
2.Microsoft Access 12.0 Object Library
 So i use Microsoft Access 12.0 Object Library and i got the same error as the one, who create this forum which is this
 
 "20807,33 Redefinition error of 'Access_IID_Properties' previously defined at test2.c: 31082"
So i don't know how to manage it because i also delete the method in test2.c which is this method
const IID Access_IID__ReportEvents2 =
 {
  0xD7281A87, 0x4B30, 0x41C5, 0xAB, 0x7B, 0xFA, 0xBF, 0x9A, 0x35, 0x44, 0x2A
 };
I don't know that i erase the correct method or not. because i see it have Ox2A

Thank you
Tankao
 
0 Kudos
Message 6 of 9
(4,897 Views)
Hello Tankao,

So I just want to clarify, did you try deleting the extra function and you are still having problems?  Or are you not sure which function to delete?
Kristen
National Instruments
Message 7 of 9
(4,864 Views)
Hi
I think i not sure sure which function that need to be delete i just guess this function 
 
const IID Access_IID__ReportEvents2 =
 {
  0xD7281A87, 0x4B30, 0x41C5, 0xAB, 0x7B, 0xFA, 0xBF, 0x9A, 0x35, 0x44, 0x2A
 };
 
 
Am i correct or not ?. Thank you
 
 
 
tankao
0 Kudos
Message 8 of 9
(4,851 Views)
Hello tankao,

What you want to delete is the second definition of Access_IID_Properties (the one corresponding to the _DAO library).  Then recompile your code and that should resolve this issue.
Regards,


Marty H.
National Instruments
0 Kudos
Message 9 of 9
(4,818 Views)