Element fields = request.GetElement("fields");
fields.AppendValue("PX_LAST");
fields.AppendValue("VOLUME_AVG_30D");
session.SendRequest(request,null);
It is an old question, but maybe one will look for an answer. Basically you can retrieve the same data via Bloomberg API. For the personal use it is a Desktop API (currently version 3). The Quick Start Guide (can be downloaded from Bloomberg Terminal) provides examples for C++, Java and C#. The names of the fields are exactly the same as in the bdp function. For example:
Element fields = request.GetElement("fields");
fields.AppendValue("PX_LAST");
fields.AppendValue("VOLUME_AVG_30D");
session.SendRequest(request,null);
Set rs = CurrentDb.OpenRecordset("Customer")
rs.AddNew
rs!cName = NewData
rs.Update
rs.Move 0, rs.LastModified
CustomerID = rs!cID
rs.Close: Set rs = Nothing
如果您需要插入子记录,则 rs.move 0 行会获取刚刚添加的记录的自动编号键。
If you're using Excel VBA already then it will be quite easy to copy and paste the code into Access VBA. You will then need to make appropriate changes to insert records rather than inserting cells. If using DAO you will want to use code similar to the following to add the records.
Set rs = CurrentDb.OpenRecordset("Customer")
rs.AddNew
rs!cName = NewData
rs.Update
rs.Move 0, rs.LastModified
CustomerID = rs!cID
rs.Close: Set rs = Nothing
The rs.move 0 line fetches the autonumbr key of the record just added should you need it to insert child records.
发布评论
评论(3)
这是一个老问题,但也许人们会寻找答案。基本上您可以通过 Bloomberg API 检索相同的数据。对于个人用途,它是一个桌面 API(当前版本 3)。快速入门指南(可以从 Bloomberg Terminal 下载)提供了 C++、Java 和 C# 的示例。字段名称与 bdp 函数中的字段名称完全相同。例如:
It is an old question, but maybe one will look for an answer. Basically you can retrieve the same data via Bloomberg API. For the personal use it is a Desktop API (currently version 3). The Quick Start Guide (can be downloaded from Bloomberg Terminal) provides examples for C++, Java and C#. The names of the fields are exactly the same as in the bdp function. For example:
是的。您需要使用 VBA 自动化在 excel 中执行此操作,或者直接写入 c api。
Yes. You need to use either VBA automation to do this in excel, or write directly to the c api.
如果您已经在使用 Excel VBA,那么将代码复制并粘贴到 Access VBA 中将非常容易。然后,您将需要进行适当的更改以插入记录而不是插入单元格。如果使用 DAO,您将需要使用类似于以下的代码来添加记录。
如果您需要插入子记录,则 rs.move 0 行会获取刚刚添加的记录的自动编号键。
If you're using Excel VBA already then it will be quite easy to copy and paste the code into Access VBA. You will then need to make appropriate changes to insert records rather than inserting cells. If using DAO you will want to use code similar to the following to add the records.
The rs.move 0 line fetches the autonumbr key of the record just added should you need it to insert child records.