如何使用 C# 生成 Quality Center 记录集?
我正在将通过 OTA API 连接到 Quality Center 的应用程序从 VB.net 转换为 C#。该应用程序广泛使用记录集,但我无法让它们在 C# 中工作。
具体来说,我无法将 Command 和 Recordset 转换为 C# 的正确格式。我尝试过的一切都失败了。
以下是我需要转换的代码的 VB.net 示例。
Private Function GetRecSet(ByVal Qry As String, TD as TDConnection) As Recordset
Dim Com As Command = TD.Command
Com.CommandText = Qry
GetRecSet = Com.Execute
GetRecSet.First()
End Function
I am converting an application that connects to Quality Center via the OTA API from VB.net to C#. The application makes extensive use of recordsets, but I have not been able to get them to work in C#.
Specifically, I have trouble casting Command and Recordset to the correct format for C#. Everything I have tried has failed.
Following, is an VB.net example of the code that I need to convert.
Private Function GetRecSet(ByVal Qry As String, TD as TDConnection) As Recordset
Dim Com As Command = TD.Command
Com.CommandText = Qry
GetRecSet = Com.Execute
GetRecSet.First()
End Function
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一番工作,并多次用头撞墙后,我想出了以下解决方案:
它似乎可以完成工作。
After a bit of work, and a lot of banging my head against a wall, I came up with the following solution:
It seems to do the job.