We help IT Professionals succeed at work.

Start  Access database once via .net and until project closes

Fordraiders
Fordraiders asked
on
161 Views
Last Modified: 2010-04-23
.net 2003
Access 2003

I'am calling and opening this same data base about 10 times in my code...
Is there a way that when I press a command to execute my code. that this line is called once and left open until the applcation closes ?

Thanks
fordraiders



 Dim oAccess As Microsoft.Office.Interop.Access.Application
        Dim oldcursor As Cursor
        'Start Access and open the database.
        oAccess = CreateObject("Access.Application")
        oAccess.Visible = False
        oAccess.OpenCurrentDatabase("C:\Program Files\Dm\Sku.mdb", False)

Comment
Watch Question

Project manager
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.