Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access, OLEDB and connection string

Posted on 2016-10-14
11
Medium Priority
?
55 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
  • 4
  • 4
  • 3
11 Comments
 
LVL 35

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 35

Expert Comment

by:Pawan Kumar
ID: 41843867
Yes you are right. It will disables OLE DB session pooling and automatic transaction enlistment.
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 78

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 78

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 35

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 78

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 1000 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 35

Accepted Solution

by:
Pawan Kumar earned 1000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

886 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