Click here to Skip to main content
16,014,662 members
Home / Discussions / C#
   

C#

 
GeneralRe: Help, CANNOT to run my C# programming get for UNSAFE Pin
GlobX8-Dec-10 16:40
GlobX8-Dec-10 16:40 
GeneralRe: Help, CANNOT to run my C# programming get for UNSAFE Pin
fjdiewornncalwe9-Dec-10 1:45
professionalfjdiewornncalwe9-Dec-10 1:45 
Questiongiving error message according to Sql data Pin
Erdinc278-Dec-10 3:50
Erdinc278-Dec-10 3:50 
AnswerRe: giving error message according to Sql data PinPopular
T M Gray8-Dec-10 4:29
T M Gray8-Dec-10 4:29 
GeneralRe: giving error message according to Sql data PinPopular
Not Active8-Dec-10 5:20
mentorNot Active8-Dec-10 5:20 
GeneralRe: giving error message according to Sql data Pin
T M Gray8-Dec-10 5:37
T M Gray8-Dec-10 5:37 
GeneralRe: giving error message according to Sql data Pin
Not Active8-Dec-10 5:44
mentorNot Active8-Dec-10 5:44 
GeneralRe: giving error message according to Sql data Pin
T M Gray8-Dec-10 7:54
T M Gray8-Dec-10 7:54 
But do you know why it is bad practice? My point is that you shouldn't do something a certain way just because someone says so (even if that someone is Microsoft). Nothing in that article explains why you shouldn't use exceptions for program flow. If you had posted this[^] instead, that at least gives reasons related to performance.

There should be real reasons behind why you code a certain way. If the original poster is not strong in SQL and has no method of source control for database schema then using the stored procedure solution makes it less maintainable. That probably outweighs the performance impact of the Exception use in one method of a small application.

Blindly following a "best practice" without considering the specific situation is a bad idea. Consider this case[^] where it is a choice of one exception or 4 database roundtrips.

Avoid dogma in code.
GeneralRe: giving error message according to Sql data Pin
Not Active8-Dec-10 8:28
mentorNot Active8-Dec-10 8:28 
GeneralRe: giving error message according to Sql data Pin
T M Gray8-Dec-10 9:00
T M Gray8-Dec-10 9:00 
GeneralRe: giving error message according to Sql data Pin
Dave Kreskowiak8-Dec-10 10:56
mveDave Kreskowiak8-Dec-10 10:56 
GeneralRe: giving error message according to Sql data Pin
AspDotNetDev8-Dec-10 11:58
protectorAspDotNetDev8-Dec-10 11:58 
GeneralRe: giving error message according to Sql data Pin
Dave Kreskowiak9-Dec-10 2:01
mveDave Kreskowiak9-Dec-10 2:01 
GeneralRe: giving error message according to Sql data PinPopular
Eddy Vluggen8-Dec-10 9:32
professionalEddy Vluggen8-Dec-10 9:32 
GeneralRe: giving error message according to Sql data Pin
PIEBALDconsult8-Dec-10 14:28
mvePIEBALDconsult8-Dec-10 14:28 
GeneralRe: giving error message according to Sql data Pin
Not Active8-Dec-10 15:22
mentorNot Active8-Dec-10 15:22 
GeneralRe: giving error message according to Sql data Pin
PIEBALDconsult8-Dec-10 15:39
mvePIEBALDconsult8-Dec-10 15:39 
GeneralRe: giving error message according to Sql data Pin
Not Active8-Dec-10 16:12
mentorNot Active8-Dec-10 16:12 
GeneralRe: giving error message according to Sql data Pin
Gary Wheeler8-Dec-10 9:38
Gary Wheeler8-Dec-10 9:38 
GeneralRe: giving error message according to Sql data Pin
Keith Barrow8-Dec-10 10:43
professionalKeith Barrow8-Dec-10 10:43 
GeneralRe: giving error message according to Sql data Pin
Gary Wheeler8-Dec-10 10:45
Gary Wheeler8-Dec-10 10:45 
GeneralRe: giving error message according to Sql data Pin
Keith Barrow8-Dec-10 10:59
professionalKeith Barrow8-Dec-10 10:59 
GeneralRe: giving error message according to Sql data Pin
PIEBALDconsult8-Dec-10 15:56
mvePIEBALDconsult8-Dec-10 15:56 
GeneralRe: giving error message according to Sql data Pin
Not Active8-Dec-10 16:18
mentorNot Active8-Dec-10 16:18 
GeneralRe: giving error message according to Sql data PinPopular
Nish Nishant8-Dec-10 9:19
sitebuilderNish Nishant8-Dec-10 9:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.