Forgot your password?
Sign in with
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Python questions
View Java questions
All Message Boards...
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Design and Architecture
Internet of Things
C / C++ / MFC
ATL / WTL / STL
Objective-C and Swift
Hardware & Devices
Hosting and Servers
.NET (Core and Framework)
Site Bugs / Suggestions
Spam and Abuse Watch
The Insider Newsletter
The Daily Build Newsletter
Most Valuable Professionals
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
What is 'CodeProject'?
Ask a Question
Bugs and Suggestions
Article Help Forum
Comments by jschell (Top 11 by date)
You need to provide more information than that - EXACTLY what didn't "work"?
If you are getting a different error message (one that doesn't mention the DSN) then it is different problem
Then the client would be closing it. But it tells you the server is.
As another suggestion if one side uses SSL and the other doesn't you might see this (although I consider that you would see the exact error less likely to appear for that reason.)
Err...do you know what the difference between debug libraries and release libraries is?
Then you should be able to use the above to explicitly hide them (so set it rather that using 'Use Defaults')
The debugger can't trap something that isn't a problem. Until it reaches the problem area it isn't a problem.
Your other apps work because you are using the library differently and/or the execution path is different.
There are libraries that you can use with C++ that allow you to more easily find pointer problems however manual inspection is still your friend (noting again that the problem is caused by code other than that where the exception occurs.)
Nope - I posted what I meant.
Your second example, overall, seems overly complex. That statement has nothing to do with your use of protected.
You could always ask them to cite a source that demonstrates why it is dangerous.
But I suspect the reviewer didn't know what they are talking about.
The point of a "protected" is to allow access by the child.
The point of inheritence is that the child had better understand the contract of the parent.
As one specific case one can allow for a 'default' value which is set by the parent and the child is specifically supposed to override it if they want.
Following is one profiler. I am certain there are others.
To effectively use a profiler you must be able to run your application in a way that simulates real business use. The profiler will not help with that.
Profiling involves two aspect for one method.
- Time how long a single method takes
- How many time the method was called.
To profile an application you do that for all or many methods. Then look at the results for all and determine maximums.
When a database involved you must also profile the database code. Look to a reference specific to your database on how to do that.
In term of 'timing' a method it involves
1. Get the start time.
2. Run method
3. Get the end time.
4. Subtract 1 from 3.
There are other factors such as that it is seldom a good idea to run a method just once nor it is a good idea to time the first run of the method. However that last is only going to apply if you are trying to do this manually.
If you are already using a pool it is unlikely that you will impact performance by closing idle connections. Most likely result of that would be to reduce performance.
If you want to improve performance then stop GUESSING.
Instead measure the application via either an automated profiling tool or by manually inserting timing measurements throughout the code. Using the measurements (not guessing) you then determine where actual performance bottlenecks lie and then you focus your analysis on those arease.
You haven't specified whether you have your own library or are using an existing one.
You also haven't specified why you think it is necessary to discard idle connections.
A idle connection is one that is not being used.
The idle time is the time based on "current time" - "last time used"
Last Updated 1 Jan 1900
All Rights Reserved.