Re: Oracle ADO query shows deleted records

From: Steve W (BunnyBoy_at_community.nospam)
Date: 08/26/04


Date: Thu, 26 Aug 2004 11:15:40 +0100

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
> >
> >
>
>



Relevant Pages

  • Re: Getting date/time fields from Oracle with ADO
    ... Yeah, when I 've used the SQL Plus Worksheet, the data was valid. ... I ran this code against my oracle database and it worked fine: ... CREATE TABLE "GROUPDOC2" NOT NULL, ... ado will report 135 for a date field in Oracle. ...
    (microsoft.public.vb.general.discussion)
  • Re: Oracle und MS-SQL
    ... > Wenn ich über SQL QueryAnalyzer oder EnterpriseManager mir den View ... Könnte es sein dass Du einen Keyset Recordset (ADO oder ODBC) ... Der ist zwar für reinen SQL Server Zugriff längst ... sp_prepare ausgeführt und das mag den Oracle Provider verwirren. ...
    (microsoft.public.de.sqlserver)
  • Re: How to get around 2 Gig limit
    ... I use ADO exclusively now so that isn't an issue at all. ... and then fill it, but if I can create the query in VBA and run it in Oracle, ... Oracle SQL or PL/SQL with passthrough queries. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Importing a CSV file into Access from Command Line
    ... >>it can import the csv file into a Oracle or a SQL Database as well. ... similar ADO based code to import into SQL or Oracle a arbitrary CSV ...
    (microsoft.public.access.externaldata)
  • Re: Limit of 1050 columns for ANSI joins
    ... comprehensive than Oracle SQL. ... I'm trying not to have any auto-generated SQL on my system, ... Index your schema properly and think about the proper design. ...
    (comp.databases.oracle.server)