whats wrong with this code???
the vb always tell that items is not a member?

Imports MySql.Data.MySqlClient

Public Class search
    Public conn As New MySqlConnection

    Private Sub search_load(ByVal server As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If conn.State = ConnectionState.Closed Then
            conn.ConnectionString = "SERVER = localhost; USERID = root; PASSWORD =; DATABSE = kahuna  "
        End If
        LoadPeople()
    End Sub

    Public Function WithDrawal(ByVal Amount As Decimal, _
      ByVal TransactionCode As Byte) As Double
        ' Add code here to perform the withdrawal,
        ' return a transaction code, 
        ' or to raise an overdraft error.
    End Function


    Public Sub LoadPeople()
        Dim sqlQuery As String = "SELECT * FROM reservation"
        Dim sqlAdapeter As New MySqlDataAdapter
        Dim sqlcmd As New MySqlCommand
        Dim rdr As MySqlDataReader = sqlcmd.ExecuteReader()
        Dim TABLE As New DataTable
        Dim i As Integer
        Dim Items As String = ""

        With sqlcmd
            .CommandText = sqlQuery
            .Connection = conn
        End With

        With sqlAdapeter
            .SelectCommand = sqlcmd
            .Fill(TABLE)
        End With

        For i = 0 To TABLE.Rows.Count - 1
            With Me
                .Items.Add(TABLE.Rows(i)("number"))
                With .Items(.Items.Count - 1).subitems
                    .Add(TABLE.Rows(i)("RoomType"))
                    .Add(TABLE.Rows(i)("Name"))
                    .Add(TABLE.Rows(i)("Location"))
                    .Add(TABLE.Rows(i)("Email"))
                    .Add(TABLE.Rows(i)("Phone"))
                    .Add(TABLE.Rows(i)("NoGuest"))
                    .Add(TABLE.Rows(i)("NoRoom"))
                    .Add(TABLE.Rows(i)("BookingType"))
                    .Add(TABLE.Rows(i)("Payment"))
                    .Add(TABLE.Rows(i)("ADate"))
                    .Add(TABLE.Rows(i)("DDate"))
                    .Add(TABLE.Rows(i)("Message"))

                End With
            End With
        Next
    End Sub

End Class

Hi!

At line 41 of your code, you have:

With Me

it should be:

With lstview
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.