Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  SQL SPROC Update Script Erases Table Records?
Previous Previous
 
Next Next
New Post 5/12/2008 4:40 PM
User is offline Ryno
289 posts
9th Ranked




SQL SPROC Update Script Erases Table Records? 
Modified By Ryno  on 5/12/2008 7:40:36 PM)

I just pasted some script into the SQL page on my database to edit some existing stored procedures and it deleted all the records in the table.  I don't know why?  I lost a bunch of data by using ALTER procedure script like:

 

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE [dbo].[AddAccess]

@UserID int, etc etc etc

Nowwhere was there an ALTER TABLE or anything like that.  Now I have to figure out if I can restore my table records somehow.  Anybody had this issue before?

 

 


I use DNN version 4.8.1
 
New Post 5/12/2008 5:35 PM
User is offline Scott Stokes
108 posts
www.adverageous.com
9th Ranked


Re: SQL SPROC Update Script Erases Table Records? 

"DROP TABLE" is what you would need to look for, in the scripts you ran, in order to figure which tables were killed.

I never did understand why there would ever be a DROP TABLE statement in a modules' SQL install scripts.

Personally I prefer table creation blocks structured like this:

IF NOT EXISTS (SELECT * FROM {databaseOwner}SYSOBJECTS WHERE id = object_id(N'{databaseOwner}[{objectQualifier}AdverExpContentTypes]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE {databaseOwner}[{objectQualifier}AdverExpContentTypes] (
 [ID] int IDENTITY ( 1,1 ) NOT NULL,
 [Extension] nvarchar(50) NULL,
 [ContentType] nvarchar(100) NULL
)

ALTER TABLE {databaseOwner}[{objectQualifier}AdverExpContentTypes] WITH NOCHECK ADD
 CONSTRAINT [{objectQualifier}PK_AdverExpContentTypes] PRIMARY KEY CLUSTERED
 (
  [ID]
 )  ON [PRIMARY]
END
GO

 

 
New Post 5/12/2008 5:43 PM
User is offline Ryno
289 posts
9th Ranked




Re: SQL SPROC Update Script Erases Table Records? 

The word TABLE wasn't in the script at all.  It was just a string of ALTER PROCEDURES to change the SPROCS.  I ALTERed the SPROC that would delete records but didn't call that SPROC.  I don't get it.


I use DNN version 4.8.1
 
New Post 5/13/2008 6:04 PM
User is offline Ryno
289 posts
9th Ranked




Re: SQL SPROC Update Script Erases Table Records? 

Ok, there was no issue.  I don't know why my SELECT statement wasn't pulling up any data from the DNN page but that's what led me to believe the records were gone.  I loaded up SQL Manager and connected to my database and found all the data was there like it should be.  I tweaked the database structure and all is good.

Nothing to see here, move along.


I use DNN version 4.8.1
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  SQL SPROC Update Script Erases Table Records?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Code 5 Systems, LLC.
The DNN Missing Link: A Form Module. Form Master 1.6 is an intuitive Form Creation Module at a great price. Quality Custom Module development, and DNN consulting services.
www.code5systems.com
SSL Enabled and Amazingly FAST...
SSL enable your DNN web site with SSLRedirect, compress your DNN web site HTTP data flow by up to 75%-90% with HttpCompressionAgent, and monitor your DNN web site's performance with WebKeepAlive...
www.sanibellogic.com
Ultra Media Gallery & Video Gallery
The most popular photo gallery and video gallery module. with Flash interface.
www.bizmodules.net

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP