- Rongsen.Com.Cn 版权所有 2008-2010 京ICP备08007000号 京公海网安备11010802026356号 朝阳网安编号:110105199号
- 北京黑客防线网安工作室-黑客防线网安服务器维护基地为您提供专业的
服务器维护
,企业网站维护
,网站维护
服务 - (建议采用1024×768分辨率,以达到最佳视觉效果) Powered by 黑客防线网安 ©2009-2010 www.rongsen.com.cn
作者:黑客防线网安Oracle维护基地 来源:黑客防线网安Oracle维护基地 浏览次数:0 |
26 End While
27 sw.Stop()
28 Loger.Info("Reading z02j form sql sever used", sw.Elapsed.TotalSeconds.ToString())
二,采用 DataAdapter 实现批量插入
VB.NET
1 sw.Start()
2 ''''Read Z02J from SQL Server
3 Dim sqlCmd As New SqlCommand()
4 sqlCmd.Connection = sqlConnection
5 sqlCmd.CommandText = "SELECT * FROM Z02J"
6
7 Dim sqlDr As SqlDataReader
8 sqlDr = sqlCmd.ExecuteReader()
9
10 Dim cmdInsertZ02J As New OracleCommand()
11 cmdInsertZ02J.Connection = oraConnection
12 cmdInsertZ02J.CommandText = BuildSQLStatement(SQLType.Insert,"z02j")
13
14 Dim dtSqlZ02J As New DataTable
15 dtSqlZ02J.Columns.Add("plantLever")
16 dtSqlZ02J.Columns.Add("material")
17 dtSqlZ02J.Columns.Add("oldMaterialNum")
18 dtSqlZ02J.Columns.Add("materialDescription")
19
20 Dim plantLever, material, oldMaterialNum, materialDescription As Object
21 While sqlDr.Read()
22 plantLever = ReadSqlDataReader(sqlDr, 0, "")
23 material = ReadSqlDataReader(sqlDr, 1, "")
24 oldMaterialNum = ReadSqlDataReader(sqlDr, 2, "")
25 materialDescription = ReadSqlDataReader(sqlDr, 3, "")
26 dtSqlZ02J.Rows.Add(plantLever, material, oldMaterialNum, materialDescription)
27 End While
28 sw.Stop()
我要申请本站:N点 | 黑客防线官网 | |
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479 |