What is Flag
Hi,
I am having doubt in flag. plz tell me what is the use of flag in .net and SQL Serevr and why we used it??
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jul 7, 2011, 12:41 AM EDT
Vilas GiteRank #951 · 2.1K reputationPosted Jul 7, 2011, 12:48 AM EDT
HI Anil,
just see:
http://social.msdn.microsoft.com/Forums/en/sqldataaccess/thread/9cb0327e-7fcc-4110-a7c6-c6411e78e36a
----------------------------------------------------------------------------------------------------
If this reply hepls your post…then "MARK AS ANSWER"!
Jiteendra SampathiraoRank #585 · 4.1K reputationPosted Jul 7, 2011, 1:25 AM EDT
Thans vulpes..very Informative.....
Dinesh BeniwalRank #9 · 64K reputationPosted Jul 7, 2011, 1:27 AM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Jul 7, 2011, 8:23 AM EDT
Anil KumarRank #942 · 2.2K reputationPosted Jul 11, 2011, 3:35 AM EDT
But i have a question that when we should use Flags in our application??
Vilas GiteRank #951 · 2.1K reputationPosted Jul 11, 2011, 3:58 AM EDT
How to set trace flag in Sql Server?
Please refer:
http://plataan.typepad.com/microsoftdynamics/2007/11/how-to-set-trac.html
If this reply hepls your post…then "MARK AS ANSWER"!
Sam HobbsRank #107 · 20.5K reputationPosted Jul 11, 2011, 11:04 AM EDT
In a database, you could call most boolean fields flags. So a flag could mean Active or Inactive. You could use a one-character field to hold one of many characters (letters) to indicate something. You could use byte fields in the manner that the Wikipedia article describes to contain bit flags that indicate various conditions.
You could use a flag in a loop to indicate things that can result in termination of the loop. A flag could indicate end-of-data and anohter flag could indicate that a certain condition has been met.
You could use a flag as an instance variable that indicates a condition that various members need to use. For example a flag could be used to indicate that an object has been opened.
The word flag in this context is very general.