cj,
A simple sqlConnection that has the Select statement and the connection
A simple datatable that you get with fill
A simple sqlCommandbuilder which you let get the information from that
\\\
dim cmd as new SqlCommandBuilder(yourdatadapter)
///
A a simple update with the same tableadapter with the changed row
And you are ready.
Another approach is creatinging an SQL Datareader with the same select
statement
To read one row
To create an SQL transact statement (which is mostly the most time consuming
in SQL transact code)
set all the parameters (the other bunch of work)
create an command (with the update command)
do an command.executenonquerry
A third approach probably most simple is
Create a datacontext (dbml)
Create a Linq statement to select the data
do a datacontext submitchanges
There are more
Cor
"cj" <cj@nospam.nospamschreef in bericht
news:OT**************@TK2MSFTNGP04.phx.gbl...
How is the best way to return a single record via sql query that will
result in me being able to read and change the values of the individual
fields as needed as I proceed through a section of code?
Once this section of code is completed that record's changed will need to
be flushed back to the table it was pulled from. This process will NOT
involve a user interface.
I've written queries to get info for a datagrid before and I've written
queries to update records before but storing and reading/changing a record
then flushing it back is new to me in VB.
I'm using VB 2008.