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.0Need help with Script modified from ADEFNeed help with Script modified from ADEF
Previous
 
Next
New Post
10/31/2006 9:16 PM
 
I used this script to generate tables.  The tables generated fine, now when I try to run the script for stored procedures.

Here is the script for the tables:

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'{databaseOwner}[{objectQualifier}YourCompany_AUDIX]') and OBJECTPROPERTY(id, N'IsTable') = 1)

DROP TABLE {databaseOwner}[{objectQualifier}YourCompany_AUDIX]
GO
CREATE TABLE {databaseOwner}[{objectQualifier}YourCompany_AUDIX] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[ModuleID] [int] NULL ,
[Name] [nvarchar] (50) NULL ,
[Branch] [nchar] (10) NULL ,
[HomePhone] [nchar] (10) NULL ,
[CellPhone] [nchar] (10) NULL ,
[TimeEntered] [timestamp] NULL,
[DateEntered] [datetime] NULL,
[Notes] [nvarchar] (250) NULL
) ON [PRIMARY]

ALTER TABLE {databaseOwner}[YourCompany_AUDIX] ADD
CONSTRAINT [PK_{objectQualifier}YourCompany_AUDIX] PRIMARY KEY CLUSTERED
(
[ID]
) ON [PRIMARY]



Here is the script to generate the stored procedures:

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

CREATE PROCEDURE {databaseOwner}[{objectQualifier}YourCompany_AUDIX_GetAll]
(
@ModuleID int
)
AS
SELECT ID, ModuleID, Name, Branch, HomePhone, CellPhone, Notes
FROM {objectQualifier}YourCompany_AUDIX
WHERE (ModuleID = @ModuleID)
order by DateEntered DESC
RETURN
GO

CREATE PROCEDURE {databaseOwner}[{objectQualifier}YourCompany_AUDIX_Insert]
(
@ModuleID int,
@Name nvarchar(50),
@Branch nchar (10),
@HomePhone nchar (10),
@CellPhone nchar (10),
@Notes nvarchar(250)
)
AS
INSERT INTO {objectQualifier}YourCompany_AUDIX
(ModuleID, Name, Branch, HomePhone, CellPhone, Notes)
VALUES (@ModuleID,@Name,@Branch,@HomePhone,CellPhone, getdate())
RETURN
GO

CREATE PROCEDURE {databaseOwner}[{objectQualifier}YourCompany_AUDIX_Update]
(
@ID int,
@Name nvarchar(50),
@Name nvarchar(50),
@Branch nchar (10),
@HomePhone nchar (10),
@CellPhone nchar (10),
@Notes nvarchar(250)
)
AS
UPDATE {objectQualifier}YourCompany_AUDIX
SET Name = @Name, Branch = @Branch, HomePhone = @HomePhone, CellPhone = @CellPhone, Notes = @Notes, DateEntered = @DateEntered, TimeEntered = @TimeEntered
WHERE (ID = @ID)
RETURN
GO
 
New Post
10/31/2006 10:31 PM
 
I can't seem to edit the post but I'm having problems creating the stored procedures.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Need help with Script modified from ADEFNeed help with Script modified from ADEF


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