• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 625
  • Last Modified:

ObjectDataSource And Connection Pool

I use an ERP system that has muliple Business Objects created for different aspects of the application.

In doing some ASP.NET Development today, I wanted to make use of some of these BO's so that I could connect and make use of the logic the system needs to work properly.
In doing so, I was able to successfully create a new ObjectDataSource and see that I can in fact make use of the logic.  My question however, is that in my application the usage of a connection pool is required almost like a connection string and I"m not sure how to tell my ObjectDataSource what this actual connection pool is actually.

I can write custom VB.NET code to connect like below and it works just fine.  Just would like to use the ObjectDataSource if at all possible.  Seems to me its a LOT more clean.

Here is how I would hard code kicking off the objects "GetList" event.  Would LOVE to do this with an ObjectDataSource so I can just bind things like my datagrids to this.

        Dim objSess As Epicor.Mfg.Core.Session
        objSess = New Epicor.Mfg.Core.Session("Username", "Password", "IP TO APPLICATION SERVER", Epicor.Mfg.Core.Session.LicenseType.Default)
        Dim recSelected As Boolean
        Dim objShipToList As New Epicor.Mfg.BO.ShipTo(objSess.ConnectionPool)
        Dim dsShipToListDataSet As New Epicor.Mfg.BO.ShipToListDataSet
        dsShipToListDataSet = objShipToList.GetList("ShipToNum = '2'", 0, 1, recSelected)
        objSess.Dispose()
0
chrisryhal
Asked:
chrisryhal
  • 2
1 Solution
 
CodeCruiserCommented:
One option is to write the above code in a method and then specify that method as the SelectMethod of the objectdatasource

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.selectmethod.aspx
0
 
chrisryhalAuthor Commented:
Thanks for the hlep.  That worked.
0
 
CodeCruiserCommented:
Glad to help :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now