Mothra Posted November 16, 2004 Posted November 16, 2004 Is there anything that would cause a stored procedure NOT to return a column that is in it's select statement? I have this happening every so often with several different stored procedures. They all work most of the time though. Is there some kind of SQL error that would cause a column not to be returned but not cause the whole action to fail? I am just stumped on this. Quote Being smarter than you look is always better than looking smarter than you are.
*Experts* Nerseus Posted November 17, 2004 *Experts* Posted November 17, 2004 I've never seen what you describe. Where exactly is the inconsistency? Is it that on some calls to ProcA, columnB isn't returned and sometimes it is? Or is it more that ProcA returns a column while ProcB doesn't - even though it's in the SELECT? How are you checking that the column is or is not being returned? If you use XML, such as GetData, keep in mind that a column will not show in the XML if its value is NULL (database null, not .NET). For example, if you have only a first and last name but not a middle name, the XML might look like: <Table1> <FirstName>Bob</FirstName> <LastName>Smith</LastName> </Table1> You won't see "<MiddleName></MiddleName>" as that would indicate that the middle name exists, but is an empty string. The lack of the element is how the XML represents null. -ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
jayceepoo Posted November 19, 2004 Posted November 19, 2004 Not sure if this matters, but are you pulling the columns directly from a table, or from a view? When you noticed the column is missing, is it in Enterprise Manager, Query Analyzer, or your program? Is there anything that would cause a stored procedure NOT to return a column that is in it's select statement? I have this happening every so often with several different stored procedures. They all work most of the time though. Is there some kind of SQL error that would cause a column not to be returned but not cause the whole action to fail? I am just stumped on this. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.