myLittleTools Community Forum

Welcome Guest Search | Active Topics | Members | Log In | Register

Stored Procedure error Options · View
winter
Posted: Thursday, October 25, 2007 11:01:21 AM
Rank: Newbie
Groups: Member

Joined: 10/25/2007
Posts: 1
Points: 0
Location: Sweden
Hi, I'm trying to create a stored procedure through myLittleAdmin but I am getting the error "Incorrect syntax near 'GO'" when using this procedure:

CREATE PROCEDURE [GetChildPages]
(@PageID int)
AS
SELECT PageID, PageTitle, PageParentID
FROM TblPages
WHERE (PageParentID = @PageID)
ORDER BY PageSortOrder
GO

But the same code works fine in Enterprize Manager.

I tried removing "GO" and it worked in the sense that I did not get an error from myLittleAdmin, but when I call the procedure from my code it does not work properly...

What am I doing wrong? frown
elian
Posted: Thursday, October 25, 2007 11:44:52 AM

Rank: Administration
Groups: Administration

Joined: 9/11/2006
Posts: 605
Points: 649
Location: Enghien Les Bains, France
What do you mean by "it does not work properly"


Just for info, we just ran your script and did not get any "Incorrect syntax near 'GO'" when using the SP.

Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Theme created by myLittleTools
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.