Azure 表,检索数据
Azure tables, Retrieve data
我试图从下面的 retrieveResult 中提取某些数据。我该怎么做:
Dim accountname As String = My.Settings.Repository
Dim accountkey As String = My.Settings.StorageKey
Dim creds As StorageCredentials = New StorageCredentials(accountname, accountkey)
Dim account As CloudStorageAccount = New CloudStorageAccount(creds, useHttps:=True)
Dim client As CloudTableClient = account.CreateCloudTableClient()
Dim table As CloudTable = client.GetTableReference(My.Settings.Table)
Dim retrieveOperation As TableOperation
Dim retrievedResult As TableResult
retrieveOperation = TableOperation.Retrieve(Of NameRecord)(var_SystemID, var_TagName)
retrievedResult = table.Execute(retrieveOperation)
所以 RetrievedResult returns 基本上来自 table.
的整个记录
我的问题是如何从检索结果中访问记录号 属性?
谢谢
@Gaurav Mantri 说的对,用这行代码就这么简单retrievedResult.Result.Record
.
如果您还有问题,请告诉我。
我试图从下面的 retrieveResult 中提取某些数据。我该怎么做:
Dim accountname As String = My.Settings.Repository
Dim accountkey As String = My.Settings.StorageKey
Dim creds As StorageCredentials = New StorageCredentials(accountname, accountkey)
Dim account As CloudStorageAccount = New CloudStorageAccount(creds, useHttps:=True)
Dim client As CloudTableClient = account.CreateCloudTableClient()
Dim table As CloudTable = client.GetTableReference(My.Settings.Table)
Dim retrieveOperation As TableOperation
Dim retrievedResult As TableResult
retrieveOperation = TableOperation.Retrieve(Of NameRecord)(var_SystemID, var_TagName)
retrievedResult = table.Execute(retrieveOperation)
所以 RetrievedResult returns 基本上来自 table.
的整个记录我的问题是如何从检索结果中访问记录号 属性?
谢谢
@Gaurav Mantri 说的对,用这行代码就这么简单retrievedResult.Result.Record
.
如果您还有问题,请告诉我。