Ask a Question related to ASP.NET General, Design and Development.
-
Kathy Burke #1
Verify Database Update
Hi, I asked this question last week, but still need some help.
When I do an update to a database record (SQL Server), how would I do
the code to verify that the update event has happened? I can't use
transactions or stored procs in SQL Server. Is there a way to use vb in
the asp.net sub procedure that would do this?
Thanks.
Kathy
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Kathy Burke Guest
-
Use a CFC to update a database with a date
Hi All, I am trying to input a date in a database field with the current date. The datefield is in one table and I only want the date to be inserted... -
update database
I have a database where I need to input values that I calculate. I only need to do this once, so I wanted to write a template to do this quickly. I... -
Can a web service update a database ?
Traditionally, examples of web service show them serving some data back to the clients. Can they update to a DB on the server too ? -
update from between database
I have a Informix Database on Solaris and a SQL database. I need to update from Informix to SQL daily. Is there any easy way of doing it? BTW, I... -
Have website login form check a forum database to verify registration
I need help with having a Login Form on a website that goes to a member only section, to beable to check my forum database so that when people... -
CT #2
Re: Verify Database Update
Would the RowUpdated event of the DataAdapter class be of any help to you?
--
Carsten Thomsen
Enterprise Development with Visual Studio .NET, UML, and MSF
[url]http://www.apress.com/book/bookDisplay.html?bID=105[/url]
"Kathy Burke" <kathyburke40@attbi.com> wrote in message
news:%23ps53i8VDHA.1832@TK2MSFTNGP09.phx.gbl...> Hi, I asked this question last week, but still need some help.
>
> When I do an update to a database record (SQL Server), how would I do
> the code to verify that the update event has happened? I can't use
> transactions or stored procs in SQL Server. Is there a way to use vb in
> the asp.net sub procedure that would do this?
>
> Thanks.
>
> Kathy
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
CT Guest
-
Kathy Burke #3
Re: Verify Database Update
Since I'm only updating one record, it sounds good!
I've never used it, could you possibly shoot me a code example of how to
use it?
Thanks!
Kathy
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Kathy Burke Guest
-
Mark #4
Re: Verify Database Update
If you use an instance of the SqlCommand class with the ExecuteNonQuery
method, it will return the number of rows affected by the SQL or Stored Proc
that executed. That would be good enough for me ... I suppose you could
also simultaneously update a modified_dt column with the current time, and
then confirm that the record now has the updated time, rather than the old
time.
Hope this helps.
Mark
[url]www.dovetaildatabases.com[/url]
"Kathy Burke" <kathyburke40@attbi.com> wrote in message
news:%23ps53i8VDHA.1832@TK2MSFTNGP09.phx.gbl...> Hi, I asked this question last week, but still need some help.
>
> When I do an update to a database record (SQL Server), how would I do
> the code to verify that the update event has happened? I can't use
> transactions or stored procs in SQL Server. Is there a way to use vb in
> the asp.net sub procedure that would do this?
>
> Thanks.
>
> Kathy
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Mark Guest
-
CT #5
Re: Verify Database Update
Kathy,
Well, here's a short VB example of how to set it up:
Protected Shared Sub OnRowUpdated(ByVal sender As Object, ByVal e As
SqlRowUpdatedEventArgs)
' In this procedure you can perform checks of what happened, i.e.
' did the updated work and if not, what went wrong.
' Check the properties of the passed instance of
' SqlRowUpdatedEventArgs (e). Please see the docs for
' more information.
End Sub
......
Dim MyDataAdapter As New SqlDataAdapter(...)
' Set up event handler
AddHandler MyDataAdapter.RowUpdated AdressOf OnRowUpdated
......
Now, the RowUpdated (after) event is commonly used in connection with the
RowUpdating event (before), so do have a look at both in the docs. I hope
this gets you going.
--
Carsten Thomsen
Enterprise Development with Visual Studio .NET, UML, and MSF
[url]http://www.apress.com/book/bookDisplay.html?bID=105[/url]
"Kathy Burke" <kathyburke40@attbi.com> wrote in message
news:%23Y54pz8VDHA.2352@TK2MSFTNGP12.phx.gbl...> Since I'm only updating one record, it sounds good!
>
> I've never used it, could you possibly shoot me a code example of how to
> use it?
>
> Thanks!
>
> Kathy
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
CT Guest



Reply With Quote

