I use SQL Server 2008 Express. I have a database with a table Names
. This table has only 3 columns: ID, FirstName, LastName
.
I created a stored procedure:
CREATE PROCEDURE GetName AS
SELECT
ID, FirstName, LastName
FROM Names
I have three records in the table. When I execute the query, the output shows only the column ID. No matter what combination of columns I choose, the query always displays one column.
Some clarifications:
I use MS Visual Web Developer 2010, language C#. I try to execute query with CTRL+ALT+F5 (Execute command from context menu). The columns are correctly designed.
I run the query in MSSQL Management Studio 2008: USE namesDB; EXEC GetNames. It works correctly (all three columns are displayed). But when I try to Execute it in MS WEB DEVELOPER, returns, it show, as I mentioned, only one column.
I have only the table I mentioned. Every field is filled. There is no empty column.
Where I am wrong ?
Thank you