VB.NET How to access one "cell" of the list & use information as a label.text

Code with C | Programming: Projects & Source Codes Forums Visual Basic Classic VB.NET How to access one "cell" of the list & use information as a label.text

This topic contains 2 replies, has 1 voice, and was last updated by  Adan 2 years, 5 months ago.

  • Author
  • #11249


    Hi, I am making a website for my VBA class that sells products which are located in a connected database. The database is already connected to my Website through other functions but I am having trouble accessing the information. My database consists of the columns ProductID, ProductName, Type, Make, Description, Price and QtyOnHan with ProductID as the primary key. I have 9 items. I am looking for a function to access each cell of this database but I cannot find it. So far, I can call to the database with a query that selects all columns and saves them as a list, but I’m not sure where to go after that. How can I access one “cell” of the list and use the information as a label.text property or an textbox.text property? Thanks for the help and I imagine the solution is an easy one!

    BTW: Product is a class I created related to all the columns of the database

    Here is what I do on page load:

  • #11250


    There are a couple of better ways to do this. Check out these links

  • #11251


    What you need is a datatable, something like this should work: Might not be 100% accurate but should be close

You must be logged in to reply to this topic.