Page 1 of 2 12 LastLast
Results 1 to 25 of 28

Thread: "textbox"

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Mar:2009
    Location: varna
    Posts: 11

    "textbox"

    ,
    , "textbox" . "DataGridView" . MS Visual C# .NET. .

  2. #2
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    , , .
    .

  3. #3
    . worm4's Avatar
    Join Date: Jul:2005
    Location: Varna
    Posts: 20,295
    data adapter
    "Arbeit macht frei" -
    - . , :..,,--?!
    OgiDogi: , , ..,

  4. #4
    Registered User
    Join Date: Mar:2009
    Location: varna
    Posts: 11
    ,
    "Visual C# 2005 " , , o "DataGridView", "textbox". tedych, . , . worm4. , . , . !

  5. #5
    Registered User
    Join Date: Apr:2004
    Location: EU
    Posts: 141

  6. #6
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    public SqlConnection myConnection;



    this.myConnection = new SqlConnection("Data Source=1.2.3.4; Initial Catalog=bazatadanni; User ID=myuser; Password=mypass");

    string queryString = "INSERT .......";
    SqlCommand command = new SqlCommand(queryString, this.myConnection);
    command.Connection.Open();
    command.ExecuteNonQuery();

    // mojesh da zatworish konekciqta tuk ako nqma da q polzwash poweche
    command.Connection.Close();

  7. #7
    Registered User
    Join Date: Mar:2009
    Location: varna
    Posts: 11
    ,
    . tedich, ! . "INSERT....". .
    Last edited by lambo13; 11th April 2009 at 07:52.

  8. #8
    . worm4's Avatar
    Join Date: Jul:2005
    Location: Varna
    Posts: 20,295


    "insert into tbltest (fld1, fld2,fld3) values ('" & txtTextBox.text & "', '" & cmbTest.Text & "', " & nudNumericUpDown.value & ");"

    string .
    NumericUpDown , .
    ....
    "Arbeit macht frei" -
    - . , :..,,--?!
    OgiDogi: , , ..,

  9. #9
    Registered User
    Join Date: Mar:2009
    Location: varna
    Posts: 11
    ,
    , . worm4! , . : "Operator '&' cannot be applied to operands of type 'string' and 'string' " "Error list". , . "&" ?
    Attached Files
    Last edited by lambo13; 12th April 2009 at 16:44.

  10. #10
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    , worm4 Visual Basic .NET .
    #, + .
    , sql injection ..

    , - - . . - .

  11. #11
    Registered User
    Join Date: Mar:2009
    Location: varna
    Posts: 11
    ! . , SQL . , "SqlConnection myConnection"? tedych !

  12. #12
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    Quote Originally Posted by lambo13 View Post
    , "SqlConnection myConnection"?
    System.Data
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  13. #13
    . worm4's Avatar
    Join Date: Jul:2005
    Location: Varna
    Posts: 20,295
    VB6
    VB , .

    . .NET .

    PostgreSQL Npgsql. ImageMake.
    , . VB, .
    "Arbeit macht frei" -
    - . , :..,,--?!
    OgiDogi: , , ..,

  14. #14
    Banned
    Join Date: Nov:2007
    Location: Sofia
    Posts: 1,400
    :

    private void InsertData(string data)
    {
    string inserStatement = @"INSERT INTO CUSTOMER (NAME) VALUE @name";
    SqlParameter parameter = new SqlParameter("@name", typeof (string));
    parameter.Value = data;
    using(SqlConnection connection = new SqlConnection("tvoqt_connection_string_k um_bazata_danni"))
    {
    connection.Open();
    SqlCommand command = new SqlCommand(inserStatement,connection);
    command.Parameters.Add(parameter);
    command.ExecuteNonQuery();
    }
    }
    , CUSTOMER NAME .

  15. #15
    Registered User
    Join Date: Oct:2006
    Location: Plovdiv
    Posts: 305
    - a - :

    void InsertData() {
    SqlConnection db = new SqlConnection("Data Source=1.2.3.4; Initial Catalog=bazatadanni; User ID=myuser; Password=mypass");
    db.Open();
    try {
    SqlCommand cmd = new SqlCommand("insert into customers (name) values (@name)",db);
    cmd.Parameters.AddWithValue("@name", txtCustomerName.Text);
    cmd.ExecuteNonQuery();
    } finally {
    db.Close();
    }
    }

    connection-a using garbagecollector-a .

    lambo13, "" ? Delphi - , data-aware web html-a
    prepBut nI vrbLike adjHungarian! qWhat's artThe adjBig nProblem?

  16. #16
    Banned
    Join Date: Nov:2007
    Location: Sofia
    Posts: 1,400
    Quote Originally Posted by DiadoMraz View Post
    - a - :

    void InsertData() {
    SqlConnection db = new SqlConnection("Data Source=1.2.3.4; Initial Catalog=bazatadanni; User ID=myuser; Password=mypass");
    db.Open();
    try {
    SqlCommand cmd = new SqlCommand("insert into customers (name) values (@name)",db);
    cmd.Parameters.AddWithValue("@name", txtCustomerName.Text);
    cmd.ExecuteNonQuery();
    } finally {
    db.Close();
    }
    }

    connection-a using garbagecollector-a .

    lambo13, "" ? Delphi - , data-aware web html-a
    using(...) { ... } try { ... } finally { ... }
    try finally.

    , - - LINQ2SQL, SqlCommand. , , - , , 2000 - DAL ORM tool.
    Last edited by PhrozenOne; 19th April 2009 at 15:00.

  17. #17
    Registered User
    Join Date: Oct:2006
    Location: Plovdiv
    Posts: 305
    Quote Originally Posted by PhrozenOne View Post
    using(...) { ... } try { ... } finally { ... }
    try finally.
    -...



    Quote Originally Posted by PhrozenOne View Post
    , - - LINQ2SQL, SqlCommand. , , - , , 2000 - DAL ORM tool.
    ORM tool-. .
    prepBut nI vrbLike adjHungarian! qWhat's artThe adjBig nProblem?

  18. #18
    Registered User
    Join Date: Mar:2009
    Location: varna
    Posts: 11
    DiadoMraz e, C#, . .., , VC++ 6.0, "Visual C# ", "Visual C# ", " Visual Basic .NET". Standard C++. . , , , , . CV-ta. , . , CV , . . . , .

  19. #19
    Registered User
    Join Date: Apr:2004
    Location: EU
    Posts: 141
    Quote Originally Posted by lambo13 View Post
    .., , VC++ 6.0, "Visual C# ", "Visual C# ", " Visual Basic .NET".
    lambo13, . .
    QuickStart Samples.

    . (TextBox):

    ...\Samples\QuickStart\Winforms\Samples\ Data\Comboboxbinding
    The sample in this subfolder binds a Windows Forms ComboBox control to an array of a custom class, binds a TextBox control to a typed DataSet, and then uses navigation buttons.

    ...\Samples\QuickStart\Winforms\Samples\ Data\Simplebinding
    The sample in this subfolder binds a TextBox to a DataTable field and implements custom formatting and parsing events.

    , .

  20. #20
    Registered User
    Join Date: Nov:2005
    Location:
    Posts: 3,317
    ??

  21. #21
    Registered User
    Join Date: Mar:2009
    Location: varna
    Posts: 11
    drunky, , , . "" , . C++. , , - . , . -. , , .

  22. #22
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    .
    , , ..
    #, , , '' , .
    ------ , MSDN/. ++ - . SqlConnection/SqlCommand.

    , . , .. .
    " # ".
    , ..

    lambo13, , , , , VStudio . "", .

  23. #23
    Registered User
    Join Date: Mar:2009
    Location: varna
    Posts: 11
    , - ! , . . . !

  24. #24
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    , , ...
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  25. #25
    Registered User
    Join Date: Mar:2009
    Location: varna
    Posts: 11
    , icaci. .

    table1TableAdapter.Insert(textBox1.Text, textBox2.Text);

    . .
    "Insert()" . . /add new data sourse/.
    TableAdapter INSERT. , .
    Last edited by lambo13; 18th April 2009 at 17:36. Reason:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |