Update the Datatable

Update the Datatable

Post by David Lozz » Thu, 03 Feb 2005 01:34:06


This is a multi-part message in MIME format.


Howdy,

I'm using a datatable in a session variable as a shopping cart. The datatable is created statically and is loaded by the user. However, I cannot figure out how to update the existing rows in the datatable. There is no database backend, it is just the datatable. How do I do this?

thanks!

--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Howdy,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'm using a datatable in a session variable as a
shopping cart. The datatable is created statically and is loaded by the user.
However, I cannot figure out how to update the existing rows in the datatable.
There is no database backend, it is just the datatable. How do I do
this?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>thanks!</FONT></DIV><FONT face=Arial size=2>
<DIV><BR>-- <BR>David Lozzi<BR>Web Applications/Network Specialist<BR>Delphi
Technology Solutions, Inc.<BR>dlozzi(remove-this)@delphi-ts.com</DIV>
<DIV> </DIV>
<DIV></FONT> </DIV></BODY></HTML>
 
 
 

Update the Datatable

Post by David Lozz » Thu, 03 Feb 2005 01:49:10

his is a multi-part message in MIME format.


Nevermind, I figured it out. Here's my code

dt.Rows.Item(id).BeginEdit()
dt.Rows.Item(id).Item(1) = partno
dt.Rows.Item(id).Item(2) = description
dt.Rows.Item(id).Item(3) = qty
dt.Rows.Item(id).EndEdit()
dt.AcceptChanges()
If you know a better way, please let me know!!


--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com


"David Lozzi" <dlozzi@(remove-this)delphi-ts.com> wrote in message news: XXXX@XXXXX.COM ...
Howdy,

I'm using a datatable in a session variable as a shopping cart. The datatable is created statically and is loaded by the user. However, I cannot figure out how to update the existing rows in the datatable. There is no database backend, it is just the datatable. How do I do this?

thanks!

--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Nevermind, I figured it out. Here's my
code</FONT></DIV>
<DIV><FONT size=1><FONT face=Arial size=2></FONT></FONT> </DIV>
<DIV><FONT size=1><FONT face=Arial
size=2>dt.Rows.Item(id).BeginEdit()<BR></FONT><FONT face=Arial
size=2>dt.Rows.Item(id).Item(1) = partno<BR></FONT><FONT face=Arial
size=2>dt.Rows.Item(id).Item(2) = description<BR></FONT><FONT face=Arial
size=2>dt.Rows.Item(id).Item(3) = qty<BR></FONT><FONT face=Arial
size=2>dt.Rows.Item(id).EndEdit()<BR></FONT><FONT face=Arial
size=2>dt.AcceptChanges()</FONT></DIV>
<DIV>
<P><FONT face=Arial size=2>If you know a better way, please let me
know!!</FONT></P></FONT></DIV>
<DIV><BR>-- <BR>David Lozzi<BR>Web Applications/Network Specialist<BR>Delphi
Technology Solutions, Inc.<BR>dlozzi(remove-this)@delphi-ts.com</DIV>
<DIV> </DIV>
<DIV> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"David Lozzi" <<A
href="mailto:dlozzi@(remove-this)delphi-ts.com">dlozzi@(remove-this)delphi-ts.com</A>>
wrote in message <A
href="news: XXXX@XXXXX.COM ">news: XXXX@XXXXX.COM </A>...</DIV>
<DIV><FONT face=Arial size=2>Howdy,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'm using a datatable in a session variable as a
shopping cart. The datatable is created statically and is loaded by the user.
However, I cannot figure out how to update the existing rows in the datatable.
There is no database backend, it is just the datatable. How do I do
this?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Ari