Problem with OleDBCommand Update

Tech-Archive recommends: Fix windows errors by optimizing your registry



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.


.



Relevant Pages

  • Re: Global ASAX
    ... want to store the connection string in the Application variable and create ... new instances of OleDbConnection as needed...having instances of objects ... > Sub Application_Start ... > Dim objConnection As OleDbConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Login program failure
    ... form postback when a username is selected. ... > dim Conn as OleDbConnection ... > Sub Page_Load ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Login program failure
    ... Works great, thanx a lot, except why do i have to click twice the Login ... >> dim Conn as OleDbConnection ... >> dim dtrUsers as OleDbDataReader ... >> End Sub ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Please help...
    ... verifying the number of rows in the dataset table. ... sub checklastname ... Dim Conn as oledbconnection ... Dim myadapter as OleDbDataAdapter ...
    (microsoft.public.dotnet.general)
  • Re: Instar a record in Access
    ... Do you have a primary key on the table? ... > Sub Page_Load ... > dim cnn as oledbconnection ...
    (microsoft.public.dotnet.framework.adonet)