c Simple addition, deletion, and modification of data

Updated on technology 2024-04-15
15 answers
  1. Anonymous users2024-02-07

    I really didn't understand what you said.

    Do you mean a form that dynamically generates controls (you only see a blank form in VS Designer and only see the controls after you run it)?

    The easiest way to do this is to copy all of the ** in InitializeComponent() into the constructor of the form.

  2. Anonymous users2024-02-06

    There are two ways, one is to combine the DateGrid control with the sqlDatesourse control, and the other is to combine the database. The former is convenient and flexible in the back. The latter one needs to write a connection string, then write a few parameters to associate with your database, and then get the information of the current page and assign values to you these parameters and then pass them to the database.

  3. Anonymous users2024-02-05

    Let's take it one step at a time, don't be too ambitious, friend.

  4. Anonymous users2024-02-04

    I won't refer to some namespaces......

    sqlcon = "server=server, database=databasename, uid=user, pwd=password";

    sqlstr1 = "insert ……";

    sqlstr2 = "update ……";

    sqlstr3 = "delete ……";

    sqlconnection con = new sqlconnection(sqlcon);

    sqlcommand com = new (sqlstr,con);;

    That's it......

  5. Anonymous users2024-02-03

    To be clear, what is the database? There are still big differences between different databases.

  6. Anonymous users2024-02-02

    So what database do you use?

    sqlserver, access, or orcal?

  7. Anonymous users2024-02-01

    //1.Declare the database connection string.

    string strcon = "data source=.;initial catalog=itdb;uid=sa;pwd=sun@0918";

    2.Create a database connection object.

    sqlconnection con = new sqlconnection(strcon);

    3.Open a database connection.

    /4.Write SQL statements.

    string sql = "delete from phzw where name='" + id+"'";

    sqlcommand cmd = new sqlcommand(sql, con);

    6.Select the appropriate method for command.

    int res = ;

    if (res > 0)

    else/7.Close the database connection.

    This is the primary ** that is deleted, new and modified, just modify the sql statement.

  8. Anonymous users2024-01-31

    The landlord should not mislead the masses.

    VS2008 doesn't have this widget in it. From the name alone, it's not a VS control, but a third-party control.

    This control is included in the NetAdvantage control suite.

    Landlord, you see UltraGrid in the toolbar on VS2008 because you have NetAdvantage installed

  9. Anonymous users2024-01-30

    There are some of them though not concrete. Let's take a look

    May help.

  10. Anonymous users2024-01-29

    This isn't a vs built-in control, right? You can use the gridview control.

  11. Anonymous users2024-01-28

    For example, a simple human information sheet.

    Added: insert into table1(name,age)values('Name',20)

    Delete: delete from table1 where name=""

    Modified: update table1 set field1=value where

  12. Anonymous users2024-01-27

    Boy! Do you dare to make it clear? How do you answer this! ~~

  13. Anonymous users2024-01-26

    Add to; on error resume next= not

    not not

    notif = "Add to; " then

    OK"else

    Add to; "end if

    Delete on error resume nextif then

  14. Anonymous users2024-01-25

    Add it and insert it.,Update it in the background and do it yourself.,If you delete a line.,Remember the line number.,That's it.,When the time comes, go to the database to delete.,After deleting, re-bind gatagridview.。

  15. Anonymous users2024-01-24

    It's all done.,There's an event for adding and deleting.,You can get the id of the line you want to move.,It's easy to refresh the gridview.。

Related questions
6 answers2024-04-15

Quick invocation of the control panel.

Usually, when we are working on a file in Explorer, we need to open the Control Panel, so we have to switch between the "Control Panel" in the Explorer and the file directory, which is a bit cumbersome. It would be nice to be able to right-click on any file, folder, or drive letter in Explorer to access the Control Panel. Here's how you can do it. >>>More

12 answers2024-04-15

Delete the program in the Control Panel.

21 answers2024-04-15

There can be a variety of psychological reasons for a woman to delete your buddy and reject your addition, here are some possible explanations: >>>More

7 answers2024-04-15

The button does not have a doubleclick event.

eventhandler(button1_doubleclick);With this method, the double-click event is not triggered when double-clicked, but rather a double-click event. >>>More

8 answers2024-04-15

Method to remove the same characters from file names in batches: >>>More