>thanks very much to you both, Cetin if you have time could you show me the other ways ?, thanks again
Pete,
Not this week, sorry:( If I don't forget maybe on saturday (because with functions saying is easy, I've to test first. ie: CommandType.StoredProcedure way never worked for me, maybe I did it wrong). Even if I could find other ways this would be the way that I'd use, it matches closely how user defined functions are used in SQL server (not the same thing as stored procedures).
Cetin