Is there a way to edit a database without Data Binding TextBoxes?

  • Thread starter Thread starter HAN(removethis)twister
  • Start date Start date
H

HAN(removethis)twister

One more question tonight... Is there a way without having to go through
the hassle of Data Binding Text Boxes to read and edit rows in a table
in a database by "code"? If so, how? Thanks!
 
Hi Han,

Sure.
Dim daretailer As New SqlDataAdapter("select rname, retcode from retailer
order by rname", oconn)

Dim dsretailer As New DataSet("retailer")

daretailer.Fill(dsretailer, "retailer")

Dim irow As DataRow

For Each irow In dsretailer.Tables(0).Rows

retailerfrombox.Items.Add(irow("rname"))

Next

But note that this example only opens the table and loops through it - you
need more code to alter the datatable and then update the back end table in,
say, sql server.

HTH,

Bernie Yaeger
 
Back
Top