45fan.com - 路饭网

搜索: 您的位置主页 > 网络频道 > 阅读资讯:将Access数据导入到Server的步骤

将Access数据导入到Server的步骤

2016-09-04 17:24:18 来源:www.45fan.com 【

将Access数据导入到Server的步骤

Option Explicit
Dim Adocon As ADODB.Connection
Private Sub Form_Load()
Set Adocon = New ADODB.Connection
Adocon.ConnectionString = "Provider = SQLOLEDB.1;Password = ; Persist Security Info = True;User ID = sa;Initial Catalog = DRUGDB; Data Source = 192.168.30.122"
Adocon.ConnectionTimeout = 120
Adocon.Open
Adocon.Execute ("delete from newsort")
Adocon.Execute ("insert into newsort(sort_id,sort_name) SELECT sort_id,sort_name FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0','Data Source=" & App.Path & "/test.MDB;User ID=Admin;Password=')...carsort")
Adocon.Close
Set Adocon = Nothing
End Sub
 

本文地址:http://www.45fan.com/a/question/72357.html
Tags: 数据 导入 Access
编辑:路饭网
关于我们 | 联系我们 | 友情链接 | 网站地图 | Sitemap | App | 返回顶部