Problem with OleDBCommand Update
- From: "Mark Sandfox" <NoSpam@xxxxxxxxxx>
- Date: Fri, 29 Jul 2005 01:49:48 GMT
The following code does nothing (not even give an error). The record
remains the same.
Sub Save_The_Buzz(Sender as Object, E as EventArgs)
Dim cnTheBuzz as OleDbConnection
Dim strUpdate as string
Dim cmdUpdate as OleDbCommand
cnTheBuzz = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=C:\Inetpub\wwwroot\SAB\sdb\TheBuzz.mdb")
strUpdate = "Update TheBuzz Set TheBuzz=@TheBuzz Where ID = 1"
cmdUpdate = New OleDbCommand(strUpdate, cnTheBuzz)
cmdUpdate.Parameters.Add("@TheBuzz",tbTheBuzz.Text)
'place try-catch routine here
cnTheBuzz.Open()
cmdUpdate.ExecuteNonQuery()
cnTheBuzz.Close()
Response.Redirect( "DE_the_buzz_update_confirm.aspx" )
End Sub
Scratching my head because this code has been reused a hundred times in the
past.
.
- Prev by Date: RE: HELP!! Win 2003 datetime format
- Next by Date: Re: WebRequest - What are these statements doing?
- Previous by thread: Custom Server Control Can't read design time property
- Next by thread: Update Control Size!
- Index(es):
Relevant Pages
|