How to display data in the database on the LAbel control in a windows program

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

    Private Sub Command1 Click() first references Microsoft ActiveX Data Objects....

    dim cnn as new

    dim rs as new

    provider=;data source=d:\;persist security info=false"

    The name of the database on disk D.

    select * from sheet", cnn, adopenkeyset, adlockoptimistic

    sheet database table name.

    The label control displays the data.

    end sub

  2. Anonymous users2024-02-06

    You can use adodb to read out the data in the database, and then display each record in the table with the caption genus of label, which I assumed and should be able to.

  3. Anonymous users2024-02-05

    Use the database connection statement to connect to the database to query directly, and then bind to the control.

  4. Anonymous users2024-02-04

    Reinstall the following VB.

    Check to see if your machine VB runtime library files are missing.

  5. Anonymous users2024-02-03

    I've never encountered such a problem, you take a closer look at the error message, and then think of a way

  6. Anonymous users2024-02-02

    Set the dock property in the DataGridView control to set it to Fill

    Or set the anchor property of the datagridview, which can be set to pull as the form pulls, so it will be enlarged.

  7. Anonymous users2024-02-01

    The main form events layout category has a resize event (which occurs when the form size changes).

    Write something in it, you can control the size of the control to change according to your needs, and the width is always 90% of the main form.

  8. Anonymous users2024-01-31

    =(( The distance from the top of the parent container remains unchanged.

    The distance from the bottom of the parent container remains unchanged.

    The distance from the left of the parent container remains unchanged.

    The distance from the right part of the parent container remains unchanged.

  9. Anonymous users2024-01-30

    By controlling the anchor property of the control.

  10. Anonymous users2024-01-29

    sqlconnection conn = new sqlconnection("server=your IP; database=the name of your database; integrated security=sspi");

    sqldatareader dr = new sqldatareader("select * from [table name].",conn);

    while(

    dr["The column name of the query column"].tostring();Query a column of values in the first row;

    Or: += dr[.]"The column name of the query column"].tostring();+=: Cycle through all values of the column, and assign the result to the value of label1 for display;

    If there is only one data in a row or column, it is recommended to use the executescalar() statement to query the data in the first row and column.

    If used, the SQL statement is changed to ("select the column name to display the column from [table name] where column name='conditions'");

    Hope. >

  11. Anonymous users2024-01-28

    You can't go wrong with recursion, you say you get it wrong if you add it to level 5, it's not that you're recursively looping

  12. Anonymous users2024-01-27

    Why do you need to add queries again and again? You can put it in a dataset and bind it directly to this control.

Related questions
11 answers2024-04-18

The ** on the first floor contains several key steps. I guess that's enough, hehe.

14 answers2024-04-18

No, at least the built-in themes are not supported.

You need to use a third-party tool. >>>More

10 answers2024-04-18

Can you post your entity class?

I'll take a look. I asked you to send an email, and you didn't send it. >>>More

12 answers2024-04-18

Some mobile phone models have built-in Polaris Office Office 5 office software that supports the Word document function, and you can also try it with third-party office software.

9 answers2024-04-18

This can be agreed upon by yourself. For example, when entering a convention, a character space is used to indicate that the item does not need to be entered. >>>More