Object reference error when using OleDbCommand object
- From: "Sunil Menon" <sunil@xxxxxxxxxxxxxxx>
- Date: 16 Dec 2005 06:48:17 -0800
Dear All,
We have created a WinForm application that uses OLEDB to connect to
Oracle DB. The Oracle client version is 8.1.6 and the Oracle DB version
is 10g...sometimes we randomly get errors like <Object reference error>
<Unable to retrieve error text for [0]>
The following are the stack strace information...
InnerException: Unable to retrieve error text for [0]
Stack Trace: at System.Data.OleDb.OleDbCommand.ProcessResults(Int32
hr)
at System.Data.OleDb.OleDbCommand.InitializeCommand(CommandBehavior
behavior, Boolean throwifnotsupported)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior
behavior, Object& executeResult)
at
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
at itbAS.Foundation.SQLHandle.ExecuteNonQuery(String sql)
Source: OraOLEDB
Extra Information:
Unable to retrieve error text for [0]
Or sometimes we get this error...
InnerException: Object reference not set to an instance of an object.
Stack Trace: at System.Data.Common.ICommandText.SetCommandText(Guid
rguidDialect, String pwszCommand)
at System.Data.OleDb.OleDbCommand.InitializeCommand(CommandBehavior
behavior, Boolean throwifnotsupported)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior
behavior, Object& executeResult)
at
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
at itbAS.Foundation.SQLHandle.ExecuteNonQuery(String sql)
Source: System.Data
Extra Information:
Object reference not set to an instance of an object.
It mostly fails at this query...
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD hh24:mi:ss'
Is this the problem with the OLEDB driver? Or...
Please help...
Thanks & regards
Sunil
.
- Follow-Ups:
- Re: Object reference error when using OleDbCommand object
- From: Paul Clement
- Re: Object reference error when using OleDbCommand object
- Prev by Date: RE: System.Transactions and SQL 2000
- Next by Date: ADODB data adapter problem
- Previous by thread: Re: Problems with creating a new table using ADOX
- Next by thread: Re: Object reference error when using OleDbCommand object
- Index(es):
Relevant Pages
|