Parameterized Store Procedures Failing


Author
Message
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Works fine when using ExecuteScalar as you posted Trent. I am not too concerned with the philosophy, but if you feel like giving a brief explanation of why one works and the other doesnt.... or why ExecuteScalar should be used over the other I'll take it. If not, I'm just happy to have something that works because I had this issue in quite a few places with after moving this app to ES.

Thanks as always.

Greg, your right it didnt end up being the problem but OUTPUT is propably technically the right return type to use, I knew it was always going to be a single integer return value so I felt ok using a return value. I may indeed refactor, thanks for the input.

Keith Chisarik

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
In short, ExecuteScalar is a direct shot to the data execution of the data layer with no other interpretation.  The SQL command is handed off and handled as is by the data layer whereas there is some interpretted logic in the ExecuteStoredProcedure (which is generally intended for more simple SPROCS). Generally speaking, I always use the ExecuteScalar, ExecuteNonQuery, etc. anytime that I want to execute a SPROC anyway as it is actually slightly better on the performance side of things.  At any rate, I am glad that you got it going.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search