VB.NET Epicor BAQ VS Connection to a Progress Server

36 篇文章 11 订阅
28 篇文章 1 订阅
转自:http://www.progresstalk.com/threads/vb-net-connection-to-a-progress-server.118412/
感谢分享......同时适用C#

I'm new to using forums, so my apologies if I'm posting in the wrong place. I'm also new to the Progress database.

The company I work for has started switching over to 64-bit Windows 7 as we get new computers. We have a number of small VB.Net programs that we use for some standalone reporting, but need to communicate to our ERP Progress server to grab some information.

The code below was written by my manager and worked fine for XP and Windows 7 32-bit, but will not make the connection for 64-bit. Doesn't really give me any error message, either. The kicker is that it works fine when I run debug in Visual Studio 2008, but does not work once compiled to an .exe.

Any idea what I need to change to connect to the Progress server under 64-bit?

Dim UserID As String = "johndoe"
Dim Password As String = "open"
Dim AppServer As String = "Progress-Server"
Dim PortNumber As String = "8301"
Dim ConnectKey As String = "AppServerDC://" & AppServer & ":" & PortNumber

Try
Me .MySession = New Session(UserID, Password, ConnectKey, LicenseType.Default)

If Me .MySession.SessionID <> "" Then
Try
Dim BAQHandler As New Epicor.Mfg.BO.DynamicQuery ( Me .MySession.ConnectionPool)

Dim DQDD As Epicor.Mfg.BO.QueryDesignDataSet
DQDD = BAQHandler.GetByID(BAQ)
BAQHandler.AddWhereItem(DQDD, BAQ, "PartPlant" , "PartNum" , "=" , True , PartNumber, "" , "" , "(" , ")" , "" , False )

Dim DQRD As New Epicor.Mfg.BO.DynamicQueryDataSet

For Each TT As DataTable In DQRD.Tables
For Each SS As DataTable In DQDD.Tables
If SS.TableName.Trim = TT.TableName.Trim Then
TT.Merge(SS)
End If
Next
Next

'Loads the data into a local datatable
dsVantageTable = BAQHandler.Execute(DQRD)


Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End If
Catch ex As Exception
MessageBox.Show( "Error" & ex.Message)
End Try
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值