we have problem regarding to the list view portion as you can see on the figure.
On the left list view, we have a list of authors which data bounded through the database.
we want it to transfer several of the information on the right list view then get its primary key from the database.
as of now we have only this piece of code.
Try Dim i As Integer For i = 0 To lvSelectedAuthor.Items.Count - 1 mysqlconn.Open() sqlstr = "SELECT * FROM author " & _ "WHERE author.authorno = " & AuthorListBox.SelectedIndex sqlcmd = New MySqlCommand(sqlstr, mysqlconn) sqldr = sqlcmd.ExecuteReader While sqldr.Read MsgBox(sqldr("authorno").ToString) End While sqldr.Close() mysqlconn.Close() Next Catch ex As Exception MsgBox(ex.ToString) End Try
we try to loop it but in return it was only retrieving the same primary key on the database which is the selected index on the left list view.
your answers is very much appreciated.
thanks in advance.