如题,请高手们写出代码,谢谢!

解决方案 »

  1.   

    select count(*) from TB
      

  2.   


    楼主你真..text1.text = rst.Fields(1).value
      

  3.   

        Dim conn As New ADODB.Connection
        With conn
            .ConnectionString = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\数据库.mdb"
            .CursorLocation = adUseClient
            .Open
        End With
        text1.text = UBound(cnn.Execute("select count(*) from [数据表]").GetRows, 2) + 1
        cnn.Close
      

  4.   

    Dim conn As New ADODB.Connection
      With conn
      .ConnectionString = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\数据库.mdb"
      .CursorLocation = adUseClient
      .Open
      text1.text = UBound(.Execute("select count(*) from [数据表]").GetRows, 2) + 1
      .Close
      End With
      

  5.   

    Dim conn As New ADODB.Connection
      With conn
      .ConnectionString = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\数据库.mdb"
      .CursorLocation = adUseClient
      .Open
      text1.text = UBound(.Execute("select * from [数据表]").GetRows, 2) + 1
      .Close
      End With