Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need help...cannot load WPF projects to VS 2008 Pin
Jun Du3-Jul-09 10:33
Jun Du3-Jul-09 10:33 
GeneralRe: Need help...cannot load WPF projects to VS 2008 Pin
Henry Minute3-Jul-09 10:37
Henry Minute3-Jul-09 10:37 
GeneralRe: Need help...cannot load WPF projects to VS 2008 Pin
Jun Du3-Jul-09 10:51
Jun Du3-Jul-09 10:51 
GeneralRe: Need help...cannot load WPF projects to VS 2008 Pin
Henry Minute3-Jul-09 11:09
Henry Minute3-Jul-09 11:09 
GeneralRe: Need help...cannot load WPF projects to VS 2008 Pin
Jun Du4-Jul-09 5:16
Jun Du4-Jul-09 5:16 
GeneralRe: Need help...cannot load WPF projects to VS 2008 Pin
Jun Du7-Jul-09 5:51
Jun Du7-Jul-09 5:51 
GeneralRe: Need help...cannot load WPF projects to VS 2008 Pin
Henry Minute7-Jul-09 6:00
Henry Minute7-Jul-09 6:00 
QuestionC# DataBase Application How you do it ? Pin
I Believe In GOD3-Jul-09 8:44
I Believe In GOD3-Jul-09 8:44 
Hi, have a good day ,

I was wondering , how do you write Database Application With C# ?

I mean what is the your way , what tools do you use and what is your rules ?

--- For me :

1 - All My SqlConnection , DataTable Are in Runtime ( no desing at all )

2 - I write INSERT and update and delete Sql Query Manually , like functions ( even if I have 50 values in INSERT command I wrote them
as paramters
public static void DeletePerson ( string guid )
{
   SqlCommand SqlCmd.CommandText ="DELETE FROM persons WHERE guid = @guid";
SqlCmd.Parameters.AddWithValue ("@guid" , guid);
SqlCmd.ExecuteNonQuery();
SqlCmd.Parameters.Clear();
}


3 - I always use paramters .
4 - I always use Transaction ( even for the short one )
5 - I never ever Use Binding Source ( I build one manually )
Like
TxtPerson.Text = clsDataTable.Rows[CurrentRecored]["Name"].ToString();


Insted of
TxtPerson.DataBindings.Add("Text" , bindingsource , "name" );

6 - I never use Identity in my database , I generte the last number
manually
SELECT MAX(PersonID) FROM persons

7 - All my tables recored dependes on GUID ( No Guid = No table at all )
8 - I use SQL Query Analyzer ... I hate VS Server Explorer ...
9 - For Complex Search Query
I used some routin's like :
public string[] SearchUserNames = { "Name"  , "Age" };  // Added to combobox
public string[] SearchDBNames =   { "pName" , "pAge"};


stQuery = "SELECT * FROM persons";
int isAnd = 0;

if (CheckName.Checked)
    {
        stQuery += " WHERE " + SearchDBNames[combobox.SelectedIndex].ToString();
        isAnd++;
    }
    if (CheckAge.Checked)
    {
        if (isAnd != 0)
        {
            stQuery += " AND ";
        }
         else
        {
            stQuery += " WHERE ";
        }
        stQuery += SearchDBNames[combobox.SelectedIndex].ToString();
        isAnd++;

    }



I want to hear from you ... what is yours ?
I am doing right ?


Thank you , for time and for your advice ...

I know nothing , I know nothing ...

AnswerRe: C# DataBase Application How you do it ? Pin
Member 44870833-Jul-09 11:38
Member 44870833-Jul-09 11:38 
AnswerRe: C# DataBase Application How you do it ? Pin
fly9043-Jul-09 12:16
fly9043-Jul-09 12:16 
QuestionUpload and delete server´s videos from client with webservices (C#) Pin
Hugo E.3-Jul-09 4:08
Hugo E.3-Jul-09 4:08 
AnswerRe: Upload and delete server´s videos from client with webservices (C#) Pin
Christian Graus3-Jul-09 5:47
protectorChristian Graus3-Jul-09 5:47 
AnswerRe: Upload and delete server´s videos from client with webservices (C#) Pin
Arindam Sinha3-Jul-09 20:53
Arindam Sinha3-Jul-09 20:53 
GeneralRe: Upload and delete server´s videos from client with webservices (C#) Pin
Hugo E.12-Jul-09 6:58
Hugo E.12-Jul-09 6:58 
QuestionHow to add scroll Horigental scroll bar in the call of DataGridView in window .net Pin
Member 46590013-Jul-09 2:22
Member 46590013-Jul-09 2:22 
AnswerRe: How to add scroll Horigental scroll bar in the call of DataGridView in window .net Pin
Manas Bhardwaj3-Jul-09 5:18
professionalManas Bhardwaj3-Jul-09 5:18 
QuestionTaborder in toolbar? Pin
netogg3-Jul-09 2:16
netogg3-Jul-09 2:16 
AnswerRe: Taborder in toolbar? Pin
Henry Minute3-Jul-09 3:11
Henry Minute3-Jul-09 3:11 
GeneralRe: Taborder in toolbar? Pin
netogg3-Jul-09 3:39
netogg3-Jul-09 3:39 
GeneralRe: Taborder in toolbar? Pin
Henry Minute3-Jul-09 3:46
Henry Minute3-Jul-09 3:46 
AnswerRe: Taborder in toolbar? Pin
DaveyM693-Jul-09 5:23
professionalDaveyM693-Jul-09 5:23 
GeneralRe: Taborder in toolbar? [modified] Pin
netogg3-Jul-09 6:05
netogg3-Jul-09 6:05 
GeneralRe: Taborder in toolbar? Pin
DaveyM693-Jul-09 6:23
professionalDaveyM693-Jul-09 6:23 
GeneralRe: Taborder in toolbar? Pin
netogg3-Jul-09 6:40
netogg3-Jul-09 6:40 
GeneralRe: Taborder in toolbar? Pin
DaveyM693-Jul-09 9:11
professionalDaveyM693-Jul-09 9:11 

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.