ero_sennin
Member
- Joined
- May 16, 2005
- Messages
- 6
- Programming Experience
- Beginner
hi i have a vb.net app that uses CR 10, the app is working fine except that every time i close my application the .ldb of the msaccess database does not disappear. please correct me if im wrong, i believe that the database was not closed. unfortunately i couldnt find out why. i have all the .close methods in my forms closed event i also closed all the thread that was running.
(form load event)
connString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=C:\Program Files\RonSoftware\CallSniper.NET\Database\RonSoftware.mdb;Jet OLEDBatabase Password=ero_sennin"
sqlconn.ConnectionString = connString
sqlconn.Open()
sqlcmd.Connection = sqlconn
sqlconn2.ConnectionString = connString
sqlconn2.Open()
qlcmd2.Connection = sqlconn2
(view report button)
rpt.Load("C:\Program Files\RonSoftware\CallSniper.NET\Reporting\Extension Detail.rpt", OpenReportMethod.OpenReportByTempCopy)
rpt.SetDatabaseLogon("admin", "ero_sennin")
CrystalReportViewer1.ReportSource = rpt
(form closed event)
mythread.abort
rpt.Close()
sqlconn.Close()
sqlconn2.Close()
sqlcmd = Nothing
sqlcmd2 = Nothing
sqlreader = Nothing
rpt = Nothing
im really confused because when i dont view the report the .ldb disappears. but when i use the view report button before closing the app the .ldb remains (crying)
please help!!!!
(form load event)
connString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=C:\Program Files\RonSoftware\CallSniper.NET\Database\RonSoftware.mdb;Jet OLEDBatabase Password=ero_sennin"
sqlconn.ConnectionString = connString
sqlconn.Open()
sqlcmd.Connection = sqlconn
sqlconn2.ConnectionString = connString
sqlconn2.Open()
qlcmd2.Connection = sqlconn2
(view report button)
rpt.Load("C:\Program Files\RonSoftware\CallSniper.NET\Reporting\Extension Detail.rpt", OpenReportMethod.OpenReportByTempCopy)
rpt.SetDatabaseLogon("admin", "ero_sennin")
CrystalReportViewer1.ReportSource = rpt
(form closed event)
mythread.abort
rpt.Close()
sqlconn.Close()
sqlconn2.Close()
sqlcmd = Nothing
sqlcmd2 = Nothing
sqlreader = Nothing
rpt = Nothing
im really confused because when i dont view the report the .ldb disappears. but when i use the view report button before closing the app the .ldb remains (crying)
please help!!!!