i have a code here that i want to show the data from the database of a certain column,
HOWEVER THE LISTBOX SHOWS:
System.Data.DataRow
System.Data.DataRow
System.Data.DataRow
System.Data.DataRow
System.Data.DataRow
instead of the data in the database.
this is my current code:
ALREADY SOLVED :)
HOWEVER THE LISTBOX SHOWS:
System.Data.DataRow
System.Data.DataRow
System.Data.DataRow
System.Data.DataRow
System.Data.DataRow
instead of the data in the database.
this is my current code:
Code:
Dim conn As SqlCeConnection = Nothing
Try
conn = New SqlCeConnection("Data Source=" & userSpecifiedPath)
conn.Open()
Dim cmd As SqlCeCommand = conn.CreateCommand()
Dim dAdp As SqlCeDataAdapter = New SqlCeDataAdapter()
Dim ds As New DataSet
cmd.CommandText = String.Format("SELECT STATUS FROM DELIVERY")
dAdp.SelectCommand = cmd
cmd.ExecuteReader()
dAdp.Fill(ds)
ListBox2.DataSource = ds.Tables(0)
cmd.ExecuteNonQuery()
Catch ex As Exception
Finally
conn.Close()
End Try