Re: Oracle ADO query shows deleted records

From: Jerry Pisk (jerryiii_at_hotmail.com)
Date: 08/26/04

  • Next message: Terry Kreft: "Re: Renumbering MS db ID?"
    Date: Thu, 26 Aug 2004 08:01:40 -0700
    
    

    The code looks ok, as long as you're closing the connections (which would
    cause its own problems but not this). The only thing I can think of is to do
    a little debugging, capture and printout the value returned by
    ExecuteNonQuery on the delete command, it returns the number of rows
    affected by that command.

    Jerry

    "Steve W" <BunnyBoy@community.nospam> wrote in message
    news:O$wNsW1iEHA.3928@TK2MSFTNGP11.phx.gbl...
    > Apologies - having re-read my original message I quite agree !
    >
    > Let me try again : I construct a sql delete statement and fire it an
    > Oracle
    > database via the following type of code :
    >
    > Dim moUpdateCon As Object
    > Dim oCmd As Object
    > moUpdateCon = New OracleClient.OracleConnection
    > moUpdateCon.ConnectionString = sConStr
    > moUpdateCon.Open()
    > oCmd = New OracleClient.OracleCommand
    > oCmd.Connection = moUpdateCon
    > oCmd.CommandText = "DELETE FROM Table Where Column = 1"
    > oCmd.ExecuteNonQuery()
    >
    > This is done via a request to a web page. Then via a request from another
    > web page by the same user, I use an OracleClient.OracleDataReader to
    > read data from the table via :
    >
    > Dim oOracleDR As OracleClient.OracleDataReader
    > Dim oCommand As OracleClient.OracleCommand
    >
    > oCommand = New OracleClient.OracleCommand("SELECT * FROM Table Where
    > Column = 1", New OracleClient.OracleConnection(sConStr))
    > oCommand.Connection.Open()
    > oOracleDR = oCommand.ExecuteReader(CommandBehavior.CloseConnection)
    >
    > This always returns the deleted row (there are no other rows in the
    > table).
    >
    > I hope that's clearer and that someone can suggest where I'm gpoing wrong
    > !
    >
    > Thanks
    >
    > Steve
    >
    > "Jerry Pisk" <jerryiii@hotmail.com> wrote in message
    > news:eqHc4MjiEHA.384@TK2MSFTNGP10.phx.gbl...
    >> You need to be a little more specific. "Delete a record from a table" is
    >> such a vague statement that you will probably not get any response to it.
    >>
    >> The short answer is no, ADO doesn't cache anything. The long answer is
    > yes,
    >> it does cache records. It all depends on what you're doing.
    >>
    >> Jerry
    >>
    >> "Steve W" <BunnyBoy@community.nospam> wrote in message
    >> news:uG6sT$fiEHA.1348@tk2msftngp13.phx.gbl...
    >> > From an ASP.NET application (or a .Net component called by an ASP.NET
    >> > application) I connect to Oracle via ADO and delete a record from a
    > table.
    >> >
    >> > If I look via Oracle's SQL plus the record has gone.
    >> >
    >> > If I then query the table, the row still seems to be there. Is ADO
    >> > caching
    >> > this data somehow ?
    >> >
    >> > Thanks
    >> >
    >> > Steve
    >> >
    >> >
    >>
    >>
    >
    >
    >


  • Next message: Terry Kreft: "Re: Renumbering MS db ID?"

    Relevant Pages

    • Re: On Error GoTo is not working
      ... Dim strRequestID As String ... Dim strMessage As String ... MsgBox "Required fields for this form are: Request ID, Date, Name, ...
      (microsoft.public.access.formscoding)
    • Re: On Error GoTo is not working
      ... Dim strRequestID As String ... Dim strMessage As String ... MsgBox "Required fields for this form are: Request ID, Date, Name, ...
      (microsoft.public.access.formscoding)
    • Re: how can I change this get code to post code
      ... In a get I didn't write anything but in a post I have to so that is why the streamwriter is required. ... Now when we run rep=req.getresponsethe postdata that was put in the web request req is now being sent to the jsp page and it's reply is being stored in rep. ... dim strcontent as string ... Dim strContent As String ...
      (microsoft.public.dotnet.languages.vb)
    • Active Directory Error - The server is unwilling to process the request
      ... The server is unwilling to process the request ... The code below determines the location of the schema, ... Dim oConn 'As ADODB.Connection ...
      (microsoft.public.dotnet.general)
    • Re: HttpHandler
      ... retrieve the content from the remote server. ... ' The request is forwarded back to the ... Dim RawBytes() As Byte = readRequest ... ' Get the stream associated with the response. ...
      (microsoft.public.dotnet.framework.aspnet)