Solved

Access, OLEDB and connection string

Posted on 2016-10-14
11
47 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 28

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 28

Expert Comment

by:Pawan Kumar
ID: 41843867
Yes you are right. It will disables OLE DB session pooling and automatic transaction enlistment.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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 28

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 28

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

739 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