Kbase P14856: How To Disable OLEDB Connection Pooling from VB Code
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/10/2008 |
|
Status: Verified
GOAL:
How to disable OLEDB connection pooling from Visual Basic (VB) applications.
FIX:
When OLEDB connection pooling is enabled by default from VB applications, SQLDisconnect is not called immediately after clients disconnect, and the _sqlsrv2 process is not released. In extreme cases, the client can run out of connections. This behavior can be changed via code.
Original code:
Private Sub ConnectProgress()
m_strConnectionString = "driver={MERANT 3.60 32-BIT PROGRESS SQL-92
v9.1C}" & _
";uid=" & Trim(txtProgUID) & _
";pwd=" & Trim(txtProgPWD.Text) & _
";db=vk4xclin;HOST=" & Trim(txtHost.Text) & _
";PORT=" & Trim(txtPort.Text)
Modified code:
Private Sub ConnectProgress()
m_strConnectionString = "driver={MERANT 3.60 32-BIT PROGRESS SQL-92
v9.1C}" & _
";uid=" & Trim(txtProgUID) & _
";pwd=" & Trim(txtProgPWD.Text) & _
";db=vk4xclin;HOST=" & Trim(txtHost.Text) & _
";PORT=" & Trim(txtPort.Text) & _
"; OLE DB Services = -2"