Claus,
Why would you add a row when you have to change an item in a column.
To give some explanation about items and columns.
A column is the description of a datatable column in such a column are items
Therefore
\\\
dim mycolumname as string = mytable.columns(0).columnname
///
gives you the name of the column
\\\
dim mycolumnitem as string = mytable.rows(0).item(0) or
dim mycolumnitem as string = mytable.rows(0).item(mycolumnname)
///
Gives you the first item in the first row
Therefore you need probably something as
\\\
mytable.rows(0).item(0) = myvalue
///
I hope this helps?
Cor
"cjobes" <cj****@nova-tech.org> schreef in bericht
news:OZ**************@tk2msftngp13.phx.gbl...
Thanks, that worked.
Now that the project doesn't time out anymore, I found another problem.
Where the dtTemp("When") column is not DBNull I need to replace the value
of
another column (dtTemp("When2") with a value of a specific variable.
Rows.Add doesn't work (although the books say that if the PK value for the
record is already there it would replace the data) and there isn't
anything
like "change" or "replace". How can I do this?
Thanks,
Claus
"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@140.99.99.130.. . "cjobes" <cj****@nova-tech.org> wrote in news:OAvLiZa1EHA.324
@TK2MSFTNGP10.phx.gbl:
> Hi all,
>
> I have a date field in a temp table as part of a DataSet. In some records > the value is DBNull. how can I trap the error with
> if dtTemp("When") = ??? Then.....
If dtTemp("When") is system.dbnull.value then
Msgbox("oops dbnull!")
end if
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/