I'm cramming for the coding test part of my second interview with the local company. The fellow knows I'm lacking in SQL Server, and he's told me he's looking for more than just coding skill for his hire, but I want to ace this. The actual test as described is pretty simple, even for someone like me who hasn't worked in SQL Server before. But I've been having one persistent problem, and I can't figure out what I'm doing wrong. I'm hoping someone here with SQL Server experience can tell me what it is, and how to correct it.
Setup is this: I've using Microsoft SQL Server Management Studio 2008 Express Edition to set up a stored procedure for a little table -- a simulated customer base with 10 records -- that I created to run a query against. Simple procedure, runs this query with the appropriate parameters:
SELECT firstname, lastname, customernumber, customersince
from dbo.dummydatabase
where customersince between @customerstart and @customerend;
"customersince" is a datetime field, and customerstart/customerend are datetime params. I created the stored procedure with the context menu "New Stored Procedure" option. The little table lives in master and as you can see from the query is called "dbo.dummydatabase". The stored procedure is in master's Stored Procedures under Programmability, and itself is called "dbo.customer_age".
The problem is that when I try to run it from an ASP.NET page I've set up in Visual Web Developer 2008 Express Edition, I get a "procedure not found" error. I also get the same error inside SQL Server Management Studio from the dynamic syntax-checking system, but I can still run the procedure via a separate query despite this. Obviously I did something wrong, but damned if I know what. Can anyone help?
Thank you.
(Edit: Corrected vague/incomplete terminology.)
-- Bob
---------
Then the horns kicked in...
...and my shoes began to squeak.
Setup is this: I've using Microsoft SQL Server Management Studio 2008 Express Edition to set up a stored procedure for a little table -- a simulated customer base with 10 records -- that I created to run a query against. Simple procedure, runs this query with the appropriate parameters:
SELECT firstname, lastname, customernumber, customersince
from dbo.dummydatabase
where customersince between @customerstart and @customerend;
"customersince" is a datetime field, and customerstart/customerend are datetime params. I created the stored procedure with the context menu "New Stored Procedure" option. The little table lives in master and as you can see from the query is called "dbo.dummydatabase". The stored procedure is in master's Stored Procedures under Programmability, and itself is called "dbo.customer_age".
The problem is that when I try to run it from an ASP.NET page I've set up in Visual Web Developer 2008 Express Edition, I get a "procedure not found" error. I also get the same error inside SQL Server Management Studio from the dynamic syntax-checking system, but I can still run the procedure via a separate query despite this. Obviously I did something wrong, but damned if I know what. Can anyone help?
Thank you.
(Edit: Corrected vague/incomplete terminology.)
-- Bob
---------
Then the horns kicked in...
...and my shoes began to squeak.