Al Meadows
2009-02-02 23:27:48 UTC
This is driving us nuts! And, I got an almost immediate deadline to figure
this out.
We created a Dot Net DLL (in C#). Used the option to Male assembly
COM-Visible under Assembly Information. On the Build Tab, checked Register
for COM interop. And added an installer class (although I didn't know what
else I was suppose to do other than add it)
Compiled it and got XYZ.DLL and XYZ.TLB.
Next, I placed these two files along with everything else in the Bin\Debug
folder up on a shared network drive.
Next, I created a new Access Application and created a code module and then
added a reference to the network based TLB. DIMmed and SET it to an object
and then used the object to call a function in the DLL that just did a
message box saying "hello form the DLL"
This works great.
I copied the MDB file up to the network also and re-tested. Everything
STILL worked great.
The developer in the next cubicle opens up the Access database and tries to
run the code module and we run into trouble in the Set Statement.
So, obviously. I'm overlooking a step to make this DLL useable by someone on
a different machine.
My research uncovered REGASM and GACUTIL. We ran REGASM on it from the
other developer's desktop but this still has problems.
Now, if the developer re-compiles the DLL on his desktop.. everything WORKS.
So, again this points to the Dot Net compilation process doing something
'for me' that isn't done for someone else unless they also use Visual Studio
to re-compile the DLL. Obviously. something we can't rollout.
Can someone walk me through the steps I'm missing to make this XYZ.DLL work
for ANYONE that opens the Access Database? And, if that simply means running
something suck as REGASM or GACUTIL. that's cool. we can install for them.
The documentation online really sucks on this.
Other Misc: This is VS2005, XYZ.DLL has an added reference to ABC.DLL which
is a wrapper around a Web Service. XYZ.DLL is meant to be called from the
Access VBA Code and which will give it instructions to upload or download
stuff to/from the web service wrapper (ABC.DLL). Just to complicate things.
XYZ.DLL itself points back to the same MDB Database backend to run queries.
But, as I said. if I compile the DLL on my desktop. everything works fine
doing nothing but setting the options on the project tab.
this out.
We created a Dot Net DLL (in C#). Used the option to Male assembly
COM-Visible under Assembly Information. On the Build Tab, checked Register
for COM interop. And added an installer class (although I didn't know what
else I was suppose to do other than add it)
Compiled it and got XYZ.DLL and XYZ.TLB.
Next, I placed these two files along with everything else in the Bin\Debug
folder up on a shared network drive.
Next, I created a new Access Application and created a code module and then
added a reference to the network based TLB. DIMmed and SET it to an object
and then used the object to call a function in the DLL that just did a
message box saying "hello form the DLL"
This works great.
I copied the MDB file up to the network also and re-tested. Everything
STILL worked great.
The developer in the next cubicle opens up the Access database and tries to
run the code module and we run into trouble in the Set Statement.
So, obviously. I'm overlooking a step to make this DLL useable by someone on
a different machine.
My research uncovered REGASM and GACUTIL. We ran REGASM on it from the
other developer's desktop but this still has problems.
Now, if the developer re-compiles the DLL on his desktop.. everything WORKS.
So, again this points to the Dot Net compilation process doing something
'for me' that isn't done for someone else unless they also use Visual Studio
to re-compile the DLL. Obviously. something we can't rollout.
Can someone walk me through the steps I'm missing to make this XYZ.DLL work
for ANYONE that opens the Access Database? And, if that simply means running
something suck as REGASM or GACUTIL. that's cool. we can install for them.
The documentation online really sucks on this.
Other Misc: This is VS2005, XYZ.DLL has an added reference to ABC.DLL which
is a wrapper around a Web Service. XYZ.DLL is meant to be called from the
Access VBA Code and which will give it instructions to upload or download
stuff to/from the web service wrapper (ABC.DLL). Just to complicate things.
XYZ.DLL itself points back to the same MDB Database backend to run queries.
But, as I said. if I compile the DLL on my desktop. everything works fine
doing nothing but setting the options on the project tab.