UniObjects for .NET - 读取和写入 UniVerse 文件

发布于 2024-08-21 13:18:33 字数 653 浏览 3 评论 0原文

我们的组织正在使用 UniObjects for .NET,但 CD 似乎丢失了。我需要弄清楚如何在 Universe 中读取和写入文件。请注意该程序是用 VB.NET 编写的,

Dim uniSession As UniSession
Private DATABASE_IDENTIFIER As String = "uvcs"

uniSession = UniObjects.OpenSession(_hostname, _username, _password, _account, DATABASE_IDENTIFIER)

' Clear the already existing LICENCE_STATUS table
Dim nepiLicenceStatusFile As UniFile = uniSession.CreateUniFile("LICENCE_STATUS")
nepiLicenceStatusFile.Open()
nepiLicenceStatusFile.ClearFile()

' Insert new values in the LICENCE_STATUS table???
' Read values from the LICENCE_STATUS table???

我需要弄清楚如何插入新值以及如何从 LICENCE_STATUS 表中读取值。这里有人可以帮助我吗?

Our organization is using UniObjects for .NET but the CD seems to have gone missing. I need to figure out how to read and write to and from files in Universe. Please note the program is written in VB.NET

Dim uniSession As UniSession
Private DATABASE_IDENTIFIER As String = "uvcs"

uniSession = UniObjects.OpenSession(_hostname, _username, _password, _account, DATABASE_IDENTIFIER)

' Clear the already existing LICENCE_STATUS table
Dim nepiLicenceStatusFile As UniFile = uniSession.CreateUniFile("LICENCE_STATUS")
nepiLicenceStatusFile.Open()
nepiLicenceStatusFile.ClearFile()

' Insert new values in the LICENCE_STATUS table???
' Read values from the LICENCE_STATUS table???

I need to figure out how to insert new values, and read values from the LICENCE_STATUS table. Can anyone here help me?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

书信已泛黄 2024-08-28 13:18:33

首先,您可以在 Rocket 网站 上找到您的手册

以下是一些示例阅读/写作

' read a record "2"
Dim ar_record As UniDynArray = nepiLicenceStatusFile.Read("2")

' write back as record "2new"
nepiLicenceStatusFile.Read("2new", ar_record)

' write a random string to a record
nepiLicenceStatusFile.write("2new", "My random string")

'read a field "7" from record "2"
Dim ar_record2 As UniDynArray = nepiLicenceStatusFile.ReadField("2", 7)

' write back to field "8"
nepiLicenceStatusFile.write("2", 8)

'read number of fields (4,5,6) from record "2"
Dim lFieldSet() As Integer = {4, 5, 6}
Dim ar_record3 As UniDynArray = nepiLicenceStatusFile.ReadFields("2", lFieldSet)

' read named field "LNAME" from record "2"
Dim ar_record4 As UniDynArray = nepiLicenceStatusFile.ReadNamedField("2", "LNAME")

' read records (2, 12, 3 and 4) as unidataset
Dim sArray As String() = {"2", "12", "3", "4"}

uSet = nepiLicenceStatusFile.ReadRecords(sArray)

我相信你现在明白了:)

Firstly, you can find your manuals on Rocket's website

Here are some examples of reading/writing

' read a record "2"
Dim ar_record As UniDynArray = nepiLicenceStatusFile.Read("2")

' write back as record "2new"
nepiLicenceStatusFile.Read("2new", ar_record)

' write a random string to a record
nepiLicenceStatusFile.write("2new", "My random string")

'read a field "7" from record "2"
Dim ar_record2 As UniDynArray = nepiLicenceStatusFile.ReadField("2", 7)

' write back to field "8"
nepiLicenceStatusFile.write("2", 8)

'read number of fields (4,5,6) from record "2"
Dim lFieldSet() As Integer = {4, 5, 6}
Dim ar_record3 As UniDynArray = nepiLicenceStatusFile.ReadFields("2", lFieldSet)

' read named field "LNAME" from record "2"
Dim ar_record4 As UniDynArray = nepiLicenceStatusFile.ReadNamedField("2", "LNAME")

' read records (2, 12, 3 and 4) as unidataset
Dim sArray As String() = {"2", "12", "3", "4"}

uSet = nepiLicenceStatusFile.ReadRecords(sArray)

I'm sure you get the idea now :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文