>Martina
>
>Thank you.
>
>My question concerns the behavior in .NET.
>The query runs slowly when i used command type Text, but when I make it a stored procedure, it flies.
>In both cases I'm using the .NET connection.
>
Using Martina's suggestion what happens if you add SET ARITHABORT ON; as a first line in the commandtext ?
If that doesn't work, you can add OPTION (RECOMPILE) at the very end of your query.
If it's not broken, fix it until it is.
My Blog