VB ADO DataGrid Access Data Query Problem Urgent

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

    The correct statement is as follows:

    if <>"" and <>"" then= true

    All" & "→" & "Records of train data information between trains"

    "train information" 'The total number of statistics records.

    strsql = "select tx as trains, tx as type, tx as origin, tx as terminal, tx as departure, tx as arrival, tx as duration, tx as mileage, tx as transit from tx trains where tx'" & "' and tx_'" & "'"

    strsql

    end if

    There are a couple of grammatical errors:

    tx should not have an underscore in front of it.

    from should not have an underscore in front of it.

    After the recordsource is assigned, it should be refreshed with refresh.

  2. Anonymous users2024-02-06

    I don't see anything wrong either.

  3. Anonymous users2024-02-05

    First, read the total number of records in the database and solve it in a loop. For example, if the total number of records is x, then:

    with datagrid1

    for i=1 to x

    amount).value = quantity).value *unit price).valuenext i

    ned with

  4. Anonymous users2024-02-04

    This column is a calculated column.

    To add a column with **.

  5. Anonymous users2024-02-03

    The return value of Yes means that it is the record pointer corresponding to the query result. When no data is queried, the default ending is true. If there is a record or data, it should be false.

    Your current eligible data was not found. There is no data logging all the time. The record pointer clock points to the last empty record.

    eof returns true. Of course there is a printout.

  6. Anonymous users2024-02-02

    "user =' " & " ' "

    The order should be reversed.

    What was said upstairs was not right.

    Equal to true or false, you can use it this way.

  7. Anonymous users2024-02-01

    No, right?

    It should be equal to a number that you try to swap it into.

    then or 1 or -1 (forgot, hehe==).

  8. Anonymous users2024-01-31

    Put it in"user =' " & " ' "

    After that, because after setting the filter conditions, it should be activated with the refresh method.

  9. Anonymous users2024-01-30

    Query key data first, such as name, quantity, amount, etc.;

    Then determine the number of data records returned.

    If it is 0It means that there is no record in the database, and you can add the record directly.

    If it is greater than 0, it means that there are the same records in the database, and you can choose or discard adding records.

  10. Anonymous users2024-01-29

    1. Add auto-grow ID

    2. Set the key

    3. Query first, then compare, and then add records.

  11. Anonymous users2024-01-28

    Use the Microsoft Jet OLE DB Provider engine to connect to the Access database as follows:

    When creating a new project, select Data Engineering, and the toolbox on the left of the VB6 integrated debugging environment is loaded with the necessary controls for database programming.

    Then add the ADODC control and the DataGrid control in the form1 form, select ADODC1 for the DataGRID1 attribute datasource, open the ADODC1 control property page to use the connection string, select Generate, select Microsoft Jet OLE DB provider for access database in the provider options, and then connect to the database as required. In the ADODC1 control property page, there is a long string of strings in the blank text window, note that this string can be copied to the program for programming. The data source of the ADODC1 control property page has a command text (SQL) writing window that can be used to write SQL query language.

    The SQL statements of this window can be copied to the program ** for programming.

    The main structure of SQL query language is as follows:

    select query field from table name where query condition statement [sort statement or grouping statement].

    Query fields must be separated by a comma or replaced by an asterisk, and the sort statement in the above query is best used.

    If there is an error in the SQL query language, you can make changes to it when the program is running. I generally follow the above connection first, SQL use"select * from tabelname"For debugging, no problem, use a button portware to copy the aforementioned connection string and SQL query language in the click event of the button control first, so that you can use it later. Then delete the adodc1 hole, add the adodc1 control, and add other content.

  12. Anonymous users2024-01-27

    Add :

    con = "provider=;data source=d:\vb\microsoft visual studio\vb98\ado\"

    string1 = "select * from workerinfo" 'Here's your SQL statement.

    string1, con, 1, 3

Related questions