Solved

Access, OLEDB and connection string

Posted on 2016-10-14
11
49 Views
Last Modified: 2016-10-20
I've inherited an app that has a connection string with :

"OLE DB Services = -4;"

I've read that this means that this will "disable OLE DB session pooling and automatic transaction enlistment".

What exactly does this mean?  Do I want this?  What are the consequences of removing it?
0
Comment
Question by:HLRosenberger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
11 Comments
 
LVL 29

Expert Comment

by:Pawan Kumar
ID: 41843831
Don't remove it. It is important. Connection pooling is good.

Consider connection pool as a cache of database connections maintained so that the connections can be reused when future requests to the database are required.

For more details refer blogs-

https://en.wikipedia.org/wiki/Connection_pool
http://geekexplains.blogspot.in/2008/06/what-is-connection-pooling-why-do-we.html
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41843850
but I read that having that setting disables pooling, no?   So I should remove it from the connection string, yes?
0
 
LVL 29

Expert Comment

by:Pawan Kumar
ID: 41843867
Yes you are right. It will disables OLE DB session pooling and automatic transaction enlistment.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 41843879
It may be a small distinction but there is a distinction that I think should be pointed out.

It doesn't "disable" anything.

It "enables"   "All except pooling and automatic transaction enlistment"

https://msdn.microsoft.com/en-us/library/ms724518(v=vs.85).aspx
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41843989
Got it.   Yes, so I then should remove that setting from the connection string.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 41844010
>> so I then should remove that setting from the connection string

We cannot answer that.  We do not know what services you need or do not need.

Whenever I inherit code, I assume there is probably a pretty good reason for the previous developer to have written the code they way they did.

Granted, a few times the developer just had no idea what they were doing and all the things they did were wrong but that should be rare.

If the setting is in the code, I would suggest leaving it.

What makes you want to remove it?
0
 
LVL 29

Expert Comment

by:Pawan Kumar
ID: 41844017
Yes if it is not creating any issues with the application then why one should remove it. Let it be.

If you face any issue then you can see. Also I think the developer who has written it must have thought about it...

So leave it for now at least that what i think.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41844171
but if I leave that setting, pooling is disabled.

Why remove it?  I do not like setting thing that I don't know what they do.  I don't know why he would want to disable pooling.
0
 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 250 total points
ID: 41844189
>> I do not like setting thing that I don't know what they do.

So, if there was some large and complex formula in the code that you didn't understand, you would just delete it?

You don't know why a certain record was inserted into a certain table, just remove the insert statement?

>>but if I leave that setting, pooling is disabled.

So?  What makes you think that is a bad thing?  What makes you think it is a good thing?

>>I don't know why he would want to disable pooling.

EXACTLY, and that is why you should not just enable it.  You don't "know why" it was done in the first place.

Maybe pooling is actually OK in your system but "automatic transaction enlistment" isn't.  So removing that line will also enable that?
0
 
LVL 29

Accepted Solution

by:
Pawan Kumar earned 250 total points
ID: 41844588
I would still urge not to remove that line. Analyze the system for some time and then decide. If you face issues with that then you can go ahead and remove it.

The whole point it the developer who put that in the connection string must have though about it because people normally put only the database name, server name and few compulsory things in connection string. So thats why let leave it there only for time being.

Hope it helps.
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 41852669
Thanks!
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question