OpenCurrentDatabase..HANGING!!! ...Automation MS Access 2003 [modified]
-
Hi, I am using C#.NET to create an instance of MS Access 2003. I try to open my Access Report, but the Application just hangs as soon as I get to the part where I open my Database. Here is part of my code: oAccess = new Access.ApplicationClass(); //No problem if(!oAccess.Visible) oAccess.Visible = true; //No problem sDBPath = "C:\\Reporting.mdb"; oAccess.OpenCurrentDatabase(sDBPath,false, ""); //PROBLEM IT HANGS!!! // Preview the report: oAccess.DoCmd.OpenReport(sReport,Access.AcView.acViewPreview, moMissing, moMissing, Access.AcWindowMode.acWindowNormal, moMissing) My problem is that it stops on the line that attempts to open the DB AND DOES NOT CONTINUE FURTHER.Ohh by the way I wrote the same code in VB6 and it worked just fine.Please help. Vuks -- modified at 9:15 Thursday 6th July, 2006