ORMQueryExecutionException parameters

Posts   
 
    
omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 12-Nov-2005 07:54:02   

I just upgraded to LLBL's 1.0.2005.1 version and my code broke in one place


Dim exp2 As ORMQueryExecutionException = DirectCast(exp, ORMQueryExecutionException)

Dim paramCol As System.Data.IDataParameterCollection = exp2.Parameters

The exp2.Parameters now returns an IList instead of IDataParameterCollection. But what about the items in exp2.Parameters; are they still of type System.Data.IDataParameter

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 12-Nov-2005 10:12:24   

Yes.

This breaking change is in the migrating your code section though. simple_smile

Frans Bouma | Lead developer LLBLGen Pro
omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 12-Nov-2005 11:31:06   

Sorry that I was not clear in my question. What I want to know is:

an item in exp2.Parameters; is it still of type System.Data.IDataParameter ?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 12-Nov-2005 13:26:11   

It's the Parameters collection of the query executed. So it can be casted to a SqlParameterCollection and contains the SqlParameter objects, if you're using sqlserver. It's no longer converted to an arraylist, but contains the full parameters. Every parameter implements IDataParameter interface, so I think it will always contain parameters of that type. If not, let me know.

Frans Bouma | Lead developer LLBLGen Pro