StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Stored Proc IssueExpand / Collapse
Author
Message
Posted 12/02/2007 9:37:40 AM


StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: Today @ 9:38:42 AM
Posts: 53, Visits: 631
Chaps,

I have a stored proc, that returns the full contents of a table, some 21 columns. Now, I have no parameters on this proc, as I intend to use it for list population etc.

Thing is, it won't deploy. I get an error that says a problem occurred with a stored proc. A problem near the word 'SELECT'.

Now if I add

@ID int

AS

at the top of the proc, it deploys fine.

Proc is

Select ID,JobNo,ProjectName,WorkDescription,ClientID,ClientContact,ContactDetails,JobManager,JobArchitect,

JobType,ClientType,EnduserCLientType,SourceofWork,Timebased,FixedFee,PercentageValueOfProject,

ExpensesID,ProjectFee,EstimatedProjectValue,ProjectPercentage,ProjectFee2 from Job

If I replace the text with SELECT * from Job it also works fine.

Any Ideas chaps?

thanks

Geoff

Post #12876
Posted 12/02/2007 8:06:25 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 4:28:09 PM
Posts: 218, Visits: 1,075
Hi Geoff,

If don't think the AS is optional in a proc, e.g.

CREATE PROCEDURE dbo.myProc

AS

    SELECT * FROM MyTable

GO

Maybe omitting the AS is causing the problem?

Cheers, Peter

Post #12877
Posted 12/03/2007 9:01:34 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 9:09:33 AM
Posts: 2,661, Visits: 1,876
Are you deploying through the DDT? 

If you are, then pay close attention to the labels of the Stored Procedure form... they list the code that will be executed when deploying the procedure...

After the "CreateProcedure" you would still need to place the AS keyword, event if you don't use any parameters.  So, the textbox would contain:

AS
Select ID,JobNo,ProjectName,WorkDescription,ClientID,ClientContact,ContactDetails,JobManager,JobArchitect, JobType,ClientType,EnduserCLientType,SourceofWork,Timebased,FixedFee,PercentageValueOfProject, ExpensesID,ProjectFee,EstimatedProjectValue,ProjectPercentage,ProjectFee2 from Job


www.bungie.net
Post #12886
Posted 12/03/2007 9:02:11 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 9:09:33 AM
Posts: 2,661, Visits: 1,876
Yep, Peter is right, the AS is not optional, even without parameters.


www.bungie.net
Post #12887
Posted 12/05/2007 4:54:18 AM


StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: Today @ 9:38:42 AM
Posts: 53, Visits: 631
Chaps,

Thanks for this. Indeed in this case adding the 'AS' does resolve the issue.

What I do have though are other procedures in the DDT, that do not have the AS in the proc, but return only a small number of columns and they have deployed fine.

If you can replicate this I would be interested to know.

thanks Geoff

Post #12903
Posted 12/06/2007 9:32:14 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 9:09:33 AM
Posts: 2,661, Visits: 1,876
Hrm... that is strange.  I can't remember the code explicitly, but we might be trying to Regex off the AS on the front, and if we don't find one, we add it.  Maybe your sproc doesn't pass our Regex, so we can't find out that the AS is missing.  I can't remember.

However, if you posted an example sproc of one that deploys fine without the AS and one that requires the AS to deploy, then I might be able to figure something out.


www.bungie.net
Post #12917
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 8:03pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 8 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.