'system.outOfMemory'类型的例外 [英] exception of type 'system.outOfMemory'
本文介绍了'system.outOfMemory'类型的例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在vb.net中开发了一个软件。我在一个系统上运行它的EXE并且它运行成功但是当我在另一个系统上运行EXE时它通过异常
'System.OutOfMemoryException'被抛出
两个系统都是全新的并且具有相同的配置
代码崩溃的代码是: -
Dim cmdDeleteData 作为 新 SqlCommand( 从temp_grimage_offline删除,,webCon)
cmdDeleteData .ExecuteNonQuery()
Dim bulk_BeeEnn As 新 SqlBulkCopy(webCon)
bulk_BeeEnn.BulkCopyTimeout = 0
bulk_BeeEnn.DestinationTableName = temp_grimag e_offline
bulk_BeeEnn.WriteToServer(ds.Tables( 0 ))
checkingForDataDuplicacy()
Dim cmd_insert 作为 新 SqlCommand( 插入emp.dbo.grimage(grno,grimage,stn,scanningdate,tbb,topay,paid,[ to],actualwt,chargedwt,nags,ftl,imageid,dgr,empid,grdate,nags_loose, +
运费,hamali,l_c,st_ser,附加费,vsc,stationary_ch,dd_chrgs,st_entry,total,upload_date)选择grno,grimage,stn, +
scanningdate,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() +
来自emp.dbo.temp_grimage_offline,webCon)
cmd_insert.CommandTimeout = 0
cmd_insert.ExecuteNonQuery()
Dim cmd_update 作为 新 SqlCommand( update emp.dbo.grimage set flag ='1'其中flag ='0'或flag为null,localCon)
cmd_update.ExecuteNonQuery()
cmd_update.CommandTimeout = 0
解决方案
以下部分未解释:
checkingForDataDuplicacy()
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
解决方案
the following section is not explained:
checkingForDataDuplicacy()
这篇关于'system.outOfMemory'类型的例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文