Try
Dim dtblrowTemp As DataRow
dtblrowTemp = dtWhatever.NewRow()
dtblrowTemp(0) = 7
dtblrowTemp(1) = "some value"
Catch exc1 As Exception
Trace.Warn(strCaller, "error adding row", exc1)
End Try
a DataTable hower is just RAM. A smarter move is calling a SPROC or
issuing an INSERT INTO to put data in database. ExceuteNonQuery is
great for that.
Utility Belt ( a free library) has a great helper for doing that
http://www.learnasp.com/freebook/learn/utilitybelt_sqlgenerateinsert.aspx
On Wed, 12 Jan 2005 16:41:30 -0000, devicekid <[EMAIL PROTECTED]> wrote:
>
> can someone plz tel me how to add new datarows to a datatable on a
> click of a button
>
>
>
>
> ________________________________
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
> To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/