i connect my access to vb2010 using adodb.
but i cant display the datas in my listview.
can someone help me to solve my problem. i would really appreaciate any help.
what i need is to get the column per column datas..
like how it is shown in the access. im a freshman college student in cs. Someone pls help me :(
here is my code:
Public Class StockList
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Private Sub StockList_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Leave
cnn.Close()
End Sub
Private Sub StockList_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cnn.Open("DBQ=C:\Users\biboy\Documents\MyInventory.accdb;Driver={Microsoft Access Driver (*.mdb, *.accdb)};uid=;pwd=;")
rst.Open("select * from Product", cnn, 1, 3)
ListView1.BeginUpdate()
ListView1 = (rst.Fields("SKU").Value)
ListView1 = (rst.Fields("Quantity").Value)
ListView1 = (rst.Fields("Description").Value)
ListView1 = (rst.Fields("UOM").Value)
ListView1 = (rst.Fields("SRP").Value)
ListView1 = (rst.Fields("Origin").Value)
ListView1 = (rst.Fields("Department").Value)
rst.Close()
End Sub
End Class