VB.NET Epicor BAQ VS Connection to a Progress Server

来源:互联网 发布:淘宝旺旺客服模板代码 编辑:程序博客网 时间:2024/06/15 06:06
转自: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 UserIDAsString = "johndoe"
Dim PasswordAsString = "open"
Dim AppServerAsString = "Progress-Server"
Dim PortNumberAsString = "8301"
Dim ConnectKeyAsString = "AppServerDC://" & AppServer &":" & PortNumber

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

IfMe.MySession.SessionID <>""Then
Try
Dim BAQHandlerAsNewEpicor.Mfg.BO.DynamicQuery (Me.MySession.ConnectionPool)

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

Dim DQRDAsNew Epicor.Mfg.BO.DynamicQueryDataSet

ForEach TT As DataTableIn DQRD.Tables
ForEach SS As DataTableIn DQDD.Tables
If SS.TableName.Trim = TT.TableName.TrimThen
TT.Merge(SS)
EndIf
Next
Next

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


Catch exAs Exception
MessageBox.Show(ex.Message)
EndTry
EndIf
Catch exAs Exception
MessageBox.Show("Error" & ex.Message)
EndTry
 
阅读全文
0 0
原创粉丝点击