View Single Post
  #1 (permalink)  
Old October 23rd, 2007, 07:27 PM
goser goser is offline
Registered User
 
Join Date: Oct 2007
Location: , , Mexico.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default IDbCommand Interface

I need to create a class to connect two databases (SQL & Sybase). Also execute Stored procedure and sql statements.

I'm using the interface IDbCommand to set the object command created depends on the dabase selected.

I have a Sybase stored procedure with one input parameter and one output parameter. I created two object ASEParameter and set at the Parameter's interface property.

When I execute the SP using the ExecuteNonQuery method, I check the value's output parameter
and it returns

'((Sybase.Data.AseClient.AseParameter)((new System.Collections.ArrayList.ArrayListDebugView(_o Comando.Parameters)).Items[1])).Value' threw an exception of type 'System.NullReferenceException'

But when I do the same procedure using SqlParameters and SQL Server stored procedure, it returns a correct value.

What it's the difference?

Whats wrong?

Regards