[dba-SQLServer] SQL Server 2005 Stored Procedures (Confused !!!!!)

James Barash James at fcidms.com
Wed Jul 12 09:50:38 CDT 2006


Paul:

When you saved the query, you were saving the script to a text file, not
creating a stored procedure in the database. You need to execute the script.
Open a new query, making sure you are referencing the correct database and
recreate the script below then click the Execute button. That will Create
the procedure on the selected database.

Hope this helps.

James Barash

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of
paul.hartland at fsmail.net
Sent: Wednesday, July 12, 2006 5:30 AM
To: accessd; dba-sqlserver; dba-vb
Subject: [dba-SQLServer] SQL Server 2005 Stored Procedures (Confused !!!!!)
Importance: High

To all,

Sorry for cross posting this again to those of you that will receive this
email more than once, I have eventually got the SQL Server Management Studio
and fairly happily playing with it.  However I thought I would create a
stored procedure so wrote a very simple one, and clicked save and it asked
me to save it as SQLQuery1 which I thought strange as I thought the name
would be genesis_select_UserLogon (as below)....But saved it none the less,
but I can't seem to find it anywhere in the database I created, but I wrote
a quick VB app to use it and it works ok....Can anyone tell me where I find
the stored procedure that I create in the database ? 

CREATE PROCEDURE [genesis_select_UserLogon] 
 (
  @strUser  [nvarchar](100),
  @strPass  [nvarchar](100)
         )
AS
SELECT Username, Password
FROM  tblUsers
WHERE Username = @strUser AND  Password = @strPass

GO

Thanks in advance for any help on this...

Paul Hartland 
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com





More information about the dba-SQLServer mailing list