PDA

Click to See Complete Forum and Search --> : mts and com (2)


stm
May 22nd, 2001, 02:07 AM
Hi,

After install a COM exported from MTS, I run my simple application, and can create the com object successfully, but once I call on of its method, I got run time error '8004e00f', 'method xxx of object yyy failed', what possible cause will be?

In general, after I add a new package to mts. If I don't export the component and just run createobject in the same machine, compare with the method that export the component, and install it in any client machine, what are the difference?

One purpose of mts is to act as middle-tire, if I need to export and install the COM everytime I amend business logic, how is it better than traditional 2-tire app?

Thx

TheBao
May 22nd, 2001, 05:10 PM
After install a COM exported from MTS, I run my simple application, and can create the com object successfully, but once I call on of its method, I got run time error '8004e00f', 'method xxx of object yyy failed', what possible cause will be?

Possible error:
- Passing wrong parameter type.
- Do not have permission to access the method.

In general, after I add a new package to mts. If I don't export the component and just run createobject in the same machine, compare with the method that export the component, and install it in any client machine, what are the difference?

They are exactly the same, the only different is that, on your client machine, you need to register the object so that the same PROGID is installed on your client machine (the exe file in the client folder after you export the package). If you run on the app on the server, then you don't need to export the package.

One purpose of mts is to act as middle-tire, if I need to export and install the COM everytime I amend business logic, how is it better than traditional 2-tire app?

In three tiers, if I need to modify the business rule, all I need to do is change the MTS objects, the client and server (user service and data service) sides stay the same. The client only need to change when you want to update the GUI, otherwise, it remains the same.

In traditional 2-tiers, then you have to modified most of the server side.

Regards,
TheBao

stm
May 22nd, 2001, 11:29 PM
Hi,

In case I export the component and install it into client machines. Whenever I need to change business rules (say add one more parameter to a method), I need to modify the component (*.dll), so I need to deploy that DLL to client machine in order for they to get the correct result. Is this the case? Any way to avoid this?

Thx

TheBao
May 23rd, 2001, 12:21 AM
You need to deplay any modified DLL, there is no way to avoid it. This is good isn't it? If you are using traditional 2 tier, then you have to deploy the whole client application.

Remember, that your modified DLL must be "Binary compatible" with the original one, or your client application will not be able to access the new DLL.

Regards,
TheBao

stm
May 23rd, 2001, 04:30 AM
Hi,

Another question that is a bit out of topic:
How's the CLSID be determined? Is it generated when I export the component from MTS? If I regenerate it the next time, will the CLSID be changed?

i.e. Need I uninstall the original COM from client b4 installing the new one, or just COPY the modified COM (*.dll) into the client machine?

Thx

stm
May 23rd, 2001, 04:40 AM
Hi,

Regarding the problem about fail to call a method, I'm sure that the parameter is correct. About permission, I dunno where to check for it.......I've tried to examine it in mts explorer, in the security tab, "authorization checking" was enabled, will it have any effect? No role was defined at all, so ..........any idea??

Thx

TheBao
May 23rd, 2001, 05:11 PM
How's the CLSID be determined? Is it generated when I export the component from MTS? If I regenerate it the next time, will the CLSID be changed?

CLSID is generated by VB every time you compile your DLL. It uses a algorithm by Open Software Foundation, which guarantee that CLSID is always unique. If you use "Binary Compatable", then the same CLSID is used.

I've tried to examine it in mts explorer, in the security tab, "authorization checking" was enabled, will it have any effect? No role was defined at all, so ..........any idea??

Yes, I think it is. Otherwise, it is your user access level.

Regards,
TheBao

stm
May 23rd, 2001, 09:18 PM
Hi,

Actually, I run both client and server in the same machine, and I'm the local admin group in NT, so I don't where will still have access right problem..........any idea?

Thx