五月天青色头像情侣网名,国产亚洲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的評論 (共 條)

分享到微博請遵守國家法律
克拉玛依市| 眉山市| 偏关县| 元朗区| 南平市| 兖州市| 耿马| 莱西市| 建水县| 孙吴县| 灌南县| 清水河县| 高清| 沙湾县| 黄山市| 包头市| 靖远县| 寻乌县| 宜兴市| 江达县| 屯昌县| 天柱县| 台南县| 松原市| 岱山县| 呈贡县| 梅河口市| 三门县| 武强县| 台南县| 新巴尔虎右旗| 高雄市| 禹州市| 呼伦贝尔市| 洛隆县| 上虞市| 永清县| 无为县| 宁武县| 尉犁县| 尤溪县|