Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How to create stored procedures?How to create stored procedures?
Previous
 
Next
New Post
5/26/2006 11:16 AM
 

Hi,
I'm following this example of creating a module in dnn 4:
http://adefwebserver.com/DotNetNukeHELP/DNN_Module4/DotNetNuke_module_4.htm

And he says that you no longer need external tools to create stored procedures.
(I guess he means CodeSmith, MyGeneration, etc.)
But when he comes to create the sp's, he says: ok, here is the script to create the sp's , please run it.
(see the link above...) .
So the new alternative is to create them by hand, or am I missing something?
thanks,
Ron

 

 
New Post
5/26/2006 8:46 PM
 

Log into the DotNetNuke website as HOST (if you are not already logged in as HOST) and from the HOST menu select SQL.

Paste the following script in the box:

CREATE PROCEDURE {databaseOwner}[{objectQualifier}YourCompany_GuestBook_Delete]
(
@ID
int
)
AS
DELETE
FROM {objectQualifier}YourCompany_GuestBook
WHERE (ID = @ID)
RETURN
GO

CREATE PROCEDURE {databaseOwner}[{objectQualifier}YourCompany_GuestBook_GetAll]
(
@ModuleID
int
)
AS
SELECT
ID, ModuleID, Name, Email, Message, DateEntered
FROM {objectQualifier}YourCompany_GuestBook
WHERE (ModuleID = @ModuleID)
order by DateEntered DESC
RETURN

GO

CREATE PROCEDURE {databaseOwner}[{objectQualifier}YourCompany_GuestBook_Insert]
(
@ModuleID
int,
@Name
nvarchar(50),
@Email
nvarchar(50),
@Message
nvarchar(250)
)

AS
INSERT
INTO {objectQualifier}YourCompany_GuestBook
(ModuleID, Name, Email, Message, DateEntered)
VALUES (@ModuleID,@Name,@Email,@Message,getdate())
RETURN
GO

CREATE PROCEDURE {databaseOwner}[{objectQualifier}YourCompany_GuestBook_Update]
(
@ID
int,
@Name
nvarchar(50),
@Email
nvarchar(50),
@Message
nvarchar(250),
@DateEntered
datetime
)
AS
UPDATE
{objectQualifier}YourCompany_GuestBook
SET Name = @Name, Email = @Email, Message = @Message, DateEntered = @DateEntered
WHERE (ID = @ID)
RETURN
GO

Select the "Run as Script" box and click "Execute".



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
6/7/2006 11:43 PM
 
i believe the creation of stored procedures can be assisted by using a dataset object. from the app_code dir, add a new item, a dataset. the dataset will allow you to configure its datasource. once you have a connection, the wizard will eventually allow you to preview all sql scripts it generates as stored procedures. copy these and attempt to run on them on your server. now you have stored procedures, but you have the problem of interfacing with your custom module by changing the different references to those procedures...i'm still working on trying to understand how the necessary amendments to the code can then be made easily. i agree the invaluable tutorial does perform a kind of hocus-pocus, copy this kind of an answer, to the adjustment of changes in the module datasources.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How to create stored procedures?How to create stored procedures?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out