|
<P>我用的是网络版的用友?
是oracle数据库。
我用excel数据查询链接到数据库了,并且用宏进行了记录。
请问根据这些代码如何嵌入到rida兄的链接数据库程序的代码里面去。</P>
<P>With ActiveSheet.QueryTables.Add(Connection:= _
"OLEDB;Provider=MSDAORA.1;User ID=repuser;Password=repuser;Data Source=REPORT", Destination:= _
Range("A1"))
.CommandType = xlCmdTable
.CommandText = Array("""TKADMIN"".""BUDGET_ACTUALNDJH""")
.Name = "REPORT (默认) BUDGET_ACTUALNDJH"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.SourceConnectionFile = "F:\MYdocuments\我的数据源\REPORT (默认) BUDGET_ACTUALNDJH.odc"
.Refresh BackgroundQuery:=False
End With
</P> |
|