Results 1 to 2 of 2

Thread: viewing data from database

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    103
    im learning vb at the moment
    i have 2 command buttons on my form called show and save, a
    listview control on my form
    i would like to connect to my SQL database called
    mydatabase on my server called 'nt009'
    my username is sa and there is no password
    "select firstname from mytable"
    "select surname from mytable"
    and display all the firstnames and surnames
    in my listview control under two headings
    name and surname and be able to edit that data then clcik on my
    save button to save that data that i edited in
    my listview control????
    can this be done??
    ive been trying for days but i cannot get it right
    please help me!!!!







  2. #2
    Member
    Join Date
    Aug 2000
    Posts
    60
    It can be done, but you can't link the listview control to the database, so you're going to have to write a routine that finds the related records when you click the save button and then updates it. One more issue that you have to think about is that you can only edit the caption of the listview items, and not the subitems.

    I suggest that you rather use a Datagrid or Flexgrid control and not the Listview control.
    Barend
    JHB-SA

    Nothing is impossible, except skiing through a revolving door.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width