将Access数据导入到Server的步骤
Option ExplicitDim 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