五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

VB把excel數(shù)據(jù)插入access

2022-03-20 17:09 作者:實習(xí)證明三方免  | 我要投稿

Private Sub CommandButton1_Click()


Set Cnn = CreateObject("ADODB.Connection")

Set Rst = CreateObject("ADODB.Recordset")

Dim stPath As String

Dim strSQL As String

Dim aa As Variant

Dim i As Integer

Dim arrFid As Variant

aa = Timer

MsgBox "準(zhǔn)備傳數(shù)據(jù)到數(shù)據(jù)庫,請稍等!", vbInformation, "溫馨提示"

stPath = ThisWorkbook.Path & Application.PathSeparator & "人力資源管理系統(tǒng).mdb"



Cnn.Open "provider=Microsoft.jet.OLEDB.4.0;data source=" & stPath & ";Jet OLEDB:Database Password=" & "access"


Cnn.Execute "DELETE * FROM 車間計件工資數(shù)據(jù)庫"



'刪除所有紀(jì)錄

strSQL = "Select * from 車間計件工資數(shù)據(jù)庫"

Rst.Open strSQL, Cnn, 1, 3


arrFid = Array("prj_NO", "S_Exp", "S_X", "S_Y", "S_Deep", "E_Exp", "E_X", "E_Y")


With Sheets("綜合線表")

For i = 2 To .Range("a65536").End(xlUp).Row '數(shù)組添加比單個添加快很多!

Rst.AddNew arrFid, Array(i - 2, Str(.Cells(i, 1)), Str(.Cells(i, 2)), Val(.Cells(i, 3)), Val(.Cells(i, 4)), Val(.Cells(i, 5)), Str(.Cells(i, 6)), Val(.Cells(i, 7)))

Next

End With


? ? ?Rst.Close: Set Rst = Nothing

? ? ?Cnn.Close: Set Cnn = Nothing


MsgBox "寫入數(shù)據(jù)" & [a2].End(xlDown).Row - 1 & "行" & vbCrLf & "傳輸完畢:耗時" & Format(Timer - aa, "0.000") & "秒", vbInformation, "溫馨提示"

Application.OnTime Now + TimeValue("00:50:00"), "chuanshu"


End Sub




VB把excel數(shù)據(jù)插入access的評論 (共 條)

分享到微博請遵守國家法律
外汇| 泰来县| 九江市| 班戈县| 漳浦县| 鸡泽县| 大田县| 商都县| 宁陕县| 静海县| 洪泽县| 香格里拉县| 佛山市| 淮阳县| 武汉市| 台山市| 梁平县| 绥中县| 抚宁县| 乌恰县| 玉门市| 堆龙德庆县| 钟祥市| 玉环县| 朝阳县| 榕江县| 文登市| 九台市| 冀州市| 芒康县| 敦化市| 舞阳县| 庄河市| 织金县| 通城县| 建昌县| 涡阳县| 阳谷县| 石嘴山市| 衡南县| 白城市|