I develop a software in vb.net. I ran its EXE on a system and it runs successfully but when I am running the EXE on another system it through exception
'System.OutOfMemoryException' was thrown
both the systems are brand new and having same configuration
code where it crashes is :-
Dim cmdDeleteData As New SqlCommand("delete from temp_grimage_offline", webCon)
cmdDeleteData.ExecuteNonQuery()
Dim bulk_BeeEnn As New SqlBulkCopy(webCon)
bulk_BeeEnn.BulkCopyTimeout = 0
bulk_BeeEnn.DestinationTableName = "temp_grimage_offline"
bulk_BeeEnn.WriteToServer(ds.Tables(0))
checkingForDataDuplicacy()
Dim cmd_insert As New SqlCommand("insert into emp.dbo.grimage(grno,grimage,stn,scanneddate,tbb,topay,paid,[to],actualwt,chargedwt,nags,ftl,imageid,dgr,empid,grdate,nags_loose, " +
"freight,hamali,l_c,st_ser,surcharge,vsc,stationary_ch,dd_chrgs,st_entry,total,upload_date) select grno,grimage,stn, " +
"scanneddate,tbb,topay,paid,[to],actualwt,chargedwt,nags,ftl,imageid,dgr,empid, " +
"grdate,nags_loose,freight,hamali,l_c,st_ser,surcharge,vsc,stationary_ch,dd_chrgs,st_entry,total,getdate() " +
"from emp.dbo.temp_grimage_offline", webCon)
cmd_insert.CommandTimeout = 0
cmd_insert.ExecuteNonQuery()
Dim cmd_update As New SqlCommand("update emp.dbo.grimage set flag = '1' where flag = '0' or flag is null", localCon)
cmd_update.ExecuteNonQuery()
cmd_update.CommandTimeout = 0