Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

.Net Connector, Connection Pool Help

Hi All,

I have implemented web application and Using SAP .net Connector 2.0 i could pull the data from SAP and displying in browser.Iam using single connection string to

connect to SAP System.

This is working fine. We are planning to move the application to production then the number of user will increase.

In this case do i need to use Connection pool with more user (Connection String)? If i want to implement connection pool how to do it in .Net application.

we are pulling data from one SAP R/3 System,in this case can i use only one connection.if multiple user is accessing my application how this sap connection will work.

1. How to create connection Pool.

2. How to get the connection from the pool.

Kindly help me out in this regard.

Thanks in Advance.



Former Member
Former Member replied

Basically Vijay,

public SAP.Connector.Connection conEstablishConnection(string strConnection)


SAP.Connector.Connection conReturn;

conReturn = null;

if(strConnection.Trim() !="")


conReturn = SAP.Connector.SAPConnectionPool.GetConnectionFromPool(strConnection);


return conReturn;


public void conReturnConnection(SAP.Connector.Connection con2Return)


if(con2Return !=null)




con2Return = null;



Establish connection function will provide a connection from pool

conReturnConnection will add to the pool. I hope this will help you in ur work



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question