本文介绍了使用access 2010表在vs210中过滤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了以下内容并且没有显示任何错误。但是,在调试时它不会过滤陆地领主ID。我已将Access表链接到visual studio 2010 ultimate。我还使用了以下youtube链接:

[]

(Stuck on part(11:54))



I have made the following and It shows no errors. However, upon debugging it does not filter the land lord ID. I have linked an Access table to visual studio 2010 ultimate. I also used this following youtube link:
http://www.youtube.com/watch?v=4H2g8H0bqEg[^]
(Stuck on part (11:54))

Imports System.Data.OleDb
Public Class Form1

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        OleDbDataAdapter2.Fill(DataSet11)

    End Sub

    Private Sub lstLID_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles lstLID.SelectedIndexChanged
        Dim landlord_ID, SQLString As String
        Dim dtFlats As New DataTable()
        Dim dbDataAdapter As OleDbDataAdapter
        Dim ConnectString As String = "Provider = Microsoft.Jet.OLEDB.4.0;" & "Data Source = Database.accdb"
        landlord_ID = lstLID.Text
        SQLString = "SELECT = FROM Flats WHERE ID = " & landlord_ID & ""
        dbDataAdapter = New OleDbDataAdapter(SQLString, ConnectString)
        dbDataAdapter.Fill(dtFlats)
        grdflats.DataSource = dtFlats
    End Sub
End Class

推荐答案

DataGridView.DataSource = DataTableObject





请按照以下链接:

[ []

[]

[]



Please, follow below links:
Walkthrough: Editing an Access Database with ADO.NET[^]
ADO.NET Overiview[^]
ADO.NET (core data access)[^]
http://vbdotnettutorials.ktsinfotech.com/DataBaseProgramming.aspx[^]


这篇关于使用access 2010表在vs210中过滤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 18:20