![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Error Message :The instruction at "0x7c82f8c7" referenced memory at
"0x00000586". . The memory could not be "read" Platform: Windows 2003 server sp1, Visual Studio 2005 using VB (SP1) I developed a simple appication in vb2005, using crystal reports ReportDocument Object. The program running fine, in debug and release mode, but when you close the program, the above error message appears. I use the debug mode to trace the problem, understand that some memory leakage. So I used the close and dispose methods of Reportdocument object in Form1_Disposed event, but the program indefenitely waiting for something. So I commented the statements in form1_Disposed event The following is the code, Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Public Class Form1 Private northwindCustomersReport As ReportDocument Private Sub ConfigureCrystalReports() northwindCustomersReport = New ReportDocument() Dim reportPath As String = Application.StartupPath & "\myReport.rpt" northwindCustomersReport.Load(reportPath) Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo() myConnectionInfo.ServerName = "myserver" myConnectionInfo.DatabaseName = "myDatabase" myConnectionInfo.IntegratedSecurity = True SetDBLogonForReport(myConnectionInfo, northwindCustomersReport) myCrystalReportViewer.ReportSource = northwindCustomersReport End Sub Private Sub SetDBLogonForReport(ByVal myConnectionInfo As ConnectionInfo, ByVal myReportDocument As ReportDocument) Dim myTables As Tables = myReportDocument.Database.Tables For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo myTableLogonInfo.ConnectionInfo = myConnectionInfo myTable.ApplyLogOnInfo(myTableLogonInfo) Next End Sub Private Sub Form1_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed 'If northwindCustomersReport IsNot Nothing Then ' northwindCustomersReport.Close() 'End If GC.Collect() End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ConfigureCrystalReports() End Sub End Class |
Ads |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Include "Telecommuting" or "Teleworking" as a "Show time as" statu | Gordon Greene | Outlook - Calandaring | 0 | July 31st 06 03:37 PM |
Cannot "Open" "Import/Export' or use "Data File Management" | Ed Isenberg | Outlook - Installation | 3 | July 16th 06 12:31 AM |
Outlook "freezes" on "reply" when I set Word as my HTML editor? | louis11 | Outlook - Installation | 0 | May 12th 06 04:43 PM |
Outlook express address book, "tools", "option" feature missing f. | Brad | Outlook - Using Contacts | 3 | March 11th 06 11:46 PM |
Only when i forward emails with attachements "550 relaying mail to" [domain] "is not allowed" | Alchemy | Outlook - General Queries | 4 | March 8th 06 11:47 PM |