none
SQL問題 RRS feed

  • 問題

  •   Dim f2 As New Confirm_f
            Dim oRpt As New CrystalReport1
            Dim time As Date = Now().ToString
            Dim dt As New DataTable()
            Dim connStr As String = "Provider = Microsoft.Jet.OLEDB.4.0;" & _
                                "Data Source = db1.MDB"
            Dim sqlStr As String = "SELECT id, item, time, price FROM pro_shop_bill WHERE time = '" & time & "' "

            Dim dataAdapter As New OleDb.OleDbDataAdapter(sqlStr, connStr)
            dataAdapter.Fill(dt)
            dataAdapter.Dispose()

            oRpt.SetDataSource(dt)
            f2.CrystalReportViewer1.ReportSource = oRpt
            f2.ShowDialog()

    SQL有什麼問題

    2010年5月22日 下午 12:48

解答

所有回覆