Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Creating Stored Procedures from Coldfusion CFQUERY

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-20 : 09:44:22
Sean Johnson writes "I tried to create a stored procedure from inside a <cfquery> tag. It created the procedure ok, but I can't get it to store the procedure in the database I want. It stores it by default in the MASTER database of SQL Server.

My code looked something like:

<cfquery name="createNewProcedure" datasource="FaxAgency">
CREATE PROCEDURE [dbo].[sp_getOneLink]
@iLinkID int
AS

SELECT iLinkID, sLabel, sLink, sImage, sALTMessage, sTarget, iOrder, dLastModified, iLastModifiedByID, bActive
FROM tLinks
WHERE iLinkID = @iLinkID

</cfquery>

Any suggestions?

Sean"

Jay99

468 Posts

Posted - 2002-03-20 : 10:48:19

use mydatabase
go
create procedure blah,blah,blah


Your other option is to change the default database of whatever user is utilized in your faxagency datasource.

Now my turn, why are you creating this proc from the web?

Jay
<O>
Go to Top of Page
   

- Advertisement -