NullReferenceException in OracleCommand.InternalExecute

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
smpickett
Posts: 3
Joined: Fri 18 Nov 2005 23:38

NullReferenceException in OracleCommand.InternalExecute

Post by smpickett » Tue 12 Oct 2010 23:32

  • dotConnect for Oracle 5.35.79.0 in OCI mode
    Visual Studio 2008 Version 9.0.30729.1 SP
    .NET Version 3.5 SP1
    Server: Oracle 11g R2 64bit
    Client: Oracle Instant Client 11.1.0.1
I am receiving the following error when executing a reader on a SelectCommand:

Code: Select all

SELECT * FROM TEX11.CONTRACTS_SEC_FS 

Code: Select all

System.NullReferenceException
Object reference not set to an instance of an object.
Stack Trace:
   at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords)
   at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
   at Quest.Toad.Db.ToadDataAdapter.InternalReadBackground()
I apologize but I have been unable to create a test project that reproduces the error. Hopefully the stack trace and DB info will help.

The CONTRACTS_SEC_FS table is an empty table with deferred segment creation, a new R2 feature. I don't know if this is the issue but it is what distinguishes the table from the others in the schema. The DDL follows:

Code: Select all

--DDL Script for TABLE "TEX11"."CONTRACTS_SEC_FS"
CREATE TABLE "TEX11"."CONTRACTS_SEC_FS"     
( 
			"CONTRACT_ID" NUMBER(12,0), 
		  "CONTRACT_NAME" VARCHAR2(80), 
		  "FILE_SIZE" NUMBER, 
		  "ORIG_FILE" BLOB    ) SEGMENT CREATION DEFERRED    
PCTFREE 60 PCTUSED 5 
INITRANS 2 
MAXTRANS 255 NOCOMPRESS NOLOGGING   
STORAGE 
( 
			
        INITIAL 65536 
        NEXT 1048576 
        MINEXTENTS 1 
        MAXEXTENTS 240   
        PCTINCREASE 15 FREELISTS 2 
        FREELIST GROUPS 3 
        BUFFER_POOL RE
CYCLE FLASH_
CACHE 
DEFAULT CELL_FLASH_
CACHE DEFAULT)   
TABLESPACE "DSP"   LOB ("ORIG_FILE") STORE AS SECUREFILE 
( 
TABLESPACE "DSPLOB" ENABLE 
STORAGE IN ROW CHUNK 8192   
NOCACHE NOLOGGING  NOCOMPRESS  KEEP_DUPLICATES )    
CREATE UNIQUE INDEX "TEX11"."SYS_IL0000109860C00004$$" ON "TEX11"."CONTRACTS_SEC_FS" 
( 
PCTFREE 10 
INITRANS 2 
MAXTRANS 255    
STORAGE 
( 
			
        INITIAL 65536 
        NEXT 1048576 
        MAXEXTENTS 2147483645)   
TABLESPACE "DSPLOB"    PARALLEL (DEGREE 0 INSTANCES 0);

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Fri 15 Oct 2010 16:28

We will investigate the situation and inform you about the results.

Also, did you try using another (non-instant) version of Oracle client or the Direct connection mode? Can the problem be reproduced in your environment in this case?

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Wed 20 Oct 2010 15:47

Could you please specify the following:
- the capacity of the workstation on which the problem occurs;
- the operating system that is used;
- whether the CONTRACTS_SEC_FS table is empty or contains any data;
- how exactly the select command is executed.

Also, did you try performing this select query with the latest 5.70.180 version of dotConnect for Oracle? It is available at
http://www.devart.com/dotconnect/oracle/download.html
(the trial version) and at Registered Users' Area (provided that you have an active subscription):
http://secure.devart.com/

We couldn't reproduce the issue in our environment.

Post Reply