What you found is the shortcut for using tlbimp.exe (which I mentioned in my
previous reply)

BUT...

>From Visual Studio .Net, you go to your solution explorer, references, right
click...add reference

Search for Microsoft Access Object Library...dbl-click it.

It will add the COM interop you need...

BUT...you will still have the issue with the process hanging out.  You will
either need to implememnt a Dispose() method or do this outside of ASP.Net.

In case you are interested, here is somethign abotu doing this from VC++
.Net:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q307473


David L. Penton, Microsoft MVP
JCPenney Application Specialist / Lead
"Mathematics is music for the mind, and Music is Mathematics for the
Soul. - J.S. Bach"
[EMAIL PROTECTED]

Do you have the VBScript Docs or SQL BOL installed?  If not, why not?
VBScript Docs: http://www.davidpenton.com/vbscript
SQL BOL: http://www.davidpenton.com/sqlbol


-----Original Message-----
From: Matthew Small [mailto:[EMAIL PROTECTED]]

OK, I've come across a page on Goolge that explains that in .NET, COM
objects are encapsulated by adding a reference to them in the solution
explorer in Visual Studio (I have no idea how to do it otherwise).  Then
VS will generate a wrapper class that has all the functionality of the
COM object.  The next question:  which COM object is the Access
application a part of?  I've looked in OLEVIEWER, I still have no idea
which it is how I would tell it in the future.

Matthew Small
IT Supervisor
Showstopper National Dance Competitions
3660 Old Kings Hwy
Murrells Inlet, SC 29576
843-357-1847
http://www.showstopperonline.com


-----Original Message-----
From: David L. Penton [mailto:[EMAIL PROTECTED]]

ASP.Net is holding a handle open to the MSA database.  A couple of
possible
options (not in any particular order):

1)  Make a COM component [in VB6] that encapsulated this functionality.
Make a COM interop file for it (tlbimp.exe)

2)  Make a standalone process which waits for messages (from your
ASP.Net
page)

3)  Make a .vbs file which encapsulates this code.  Use
System.Diagnostics.Process.Start() (I think that is the right one) to
run
this vbs file

4)  Figure out how to implement .Dispose() on the objAccess variable

-----Original Message-----
From: Matthew Small [mailto:[EMAIL PROTECTED]]

Here is my code, it still does not appear to be working. I am still
leaving an instance open every time I run this code.  What am I doing
wrong?



dim objAccess, objReport
objAccess = Server.CreateObject("Access.Application")
objAccess.OpenCurrentDatabase ("c:\inetpub\db\checkbook.mdb")
objAccess.doCmd.OpenReport("aggregate_report-account_order")
objAccess.doCmd.Close()
objAccess.CloseCurrentDatabase()
objAccess.Application.Quit()
objAccess = nothing

Matthew Small
IT Supervisor
Showstopper National Dance Competitions
3660 Old Kings Hwy
Murrells Inlet, SC 29576
843-357-1847
http://www.showstopperonline.com


---
You are currently subscribed to dotnet as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/


Reply via email to