|
VBA连接金碟KIS查询数据
Sub 从Access中取数()
Set conn = CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;User ID=morningstar;" _
& "Password=ypbwkfyjhyhgzj;Data Source=" & ThisWorkbook.Path & "\1.AIS;" _
& "Persist Security Info=False;Jet OLEDB:System database=" & ThisWorkbook.Path & "\System.mda"
Sql = "select * from GLVch"
[A2].CopyFromRecordset conn.Execute(Sql)
conn.Close
Set conn = Nothing
End Sub
System.mda这个文件是从金碟KIS安装目录复制出来的,右击金碟KIS快捷方式在属性中就能找到这个文件的存放位置。
|
-
-
1.rar
603.05 KB, 下载次数: 34
|