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  |  

AspDotNetStoreFront
  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  SQL Problem - I don't get it...
Previous Previous
 
Next Next
New Post 6/12/2006 12:02 PM
User is offline Edward Beck
190 posts
9th Ranked


Re: SQL Problem - I don't get it... 

Straight from SQL Server Management Studio the SQL code in the package worked like a charm.  It is somewhere during the conversion to the DNN db & object qualifier process that this breaks. 

Bertcord, when you said to drop the dbo schema in the constraints, were you referring to the DNN qualifiers or any reference to dbo?  With [dbo].[xxx   on all constraints (from SQLS) it works fine. 

 

 
New Post 6/12/2006 12:44 PM
User is offline Bert Corderman
109 posts
9th Ranked


Re: SQL Problem - I don't get it... 
 wedwardbeck wroteYou basically put it right back where it was without the {databaseowner}{objectqualifier} tags - which I thought were required. In that form, I can get it to work perfectly (at least on the SQL page in DNN).

CONSTAINTS need to be UNIQUE but are not prefaced with databaseowner.  Try only added the objectqualifier tag for the CONSTRAINT.

 wedwardbeck wrote
#3 - I've seen it both ways, so I'm unsure why this is a factor.  I reference the blog SQL files for that change.  I also tried it both ways wih neither making a difference.  Maybe I'm not getting past other errors.

You can use sys.objects or sysobjects as they point to the same information.  The porobem is that the column object_id only exists in sys.objects.  If using sysobjects it would be id.  I personally use sysobjects so the same script can be used for both SQL 2000 and 2005.

Bert

 
New Post 6/14/2006 9:37 AM
User is offline Edward Beck
190 posts
9th Ranked


Re: SQL Problem - I don't get it... 

I finally got this working, but had to remove the if not exists checks on FK's.  If anyone knows the proper placement of the databaseowner and objectqualifier tokens for this - I'd appreciate learning that!  I may have trouble on the uninstall SQL script until I figure that out. 

Here's one line (of many - so it is getting old trying to figure this out).  This fails at the foreign_keys and sys.foreign_keys. 

IF NOT EXISTS (SELECT * FROM foreign_keys WHERE id = object_id(N'[FK_{objectQualifier}ocps_pd_course_type_Modules]') AND parent_object_id = OBJECT_ID(N'{databaseOwner}{objectQualifier}[ocps_pd_course_type]'))

 
New Post 8/24/2006 3:48 AM
User is offline Vladan Strigo
505 posts
Vladan.Strigo.NET
8th Ranked




Re: SQL Problem - I don't get it... 

Looking like this your problem is in the following:

IF NOT EXISTS (SELECT * FROM foreign_keys WHERE id = object_id(N'[FK_{objectQualifier}ocps_pd_course_type_Modules]') AND parent_object_id = OBJECT_ID(N'{databaseOwner}{objectQualifier}[ocps_pd_course_type]'))

It should be:

IF NOT EXISTS (SELECT * FROM foreign_keys WHERE id = object_id(N'[FK_{objectQualifier}ocps_pd_course_type_Modules]') AND parent_object_id = OBJECT_ID(N'{databaseOwner}[{objectQualifier}ocps_pd_course_type]'))

 

HTH


Thanks,
Vladan Strigo
NETMedia

My website: Vladan.Strigo.NET

Vladan.Strigo.NET: Projects
* Advanced VS2005 development approach - BlankModule
* DNN & Microsoft Ajax best practices guidance

Vladan.Strigo.NET: Resources
* Comprehensive list of DNN 4 Module development resources

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  SQL Problem - I don't get it...
 


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.

 


Hosting for DotNetNuke
SiteGround.com is the best place to host your DotNetNuke website! Expert DotNetNuke support, reliable servers, low price!
www.SiteGround.com
Code Endeavors, LLC
Do you Endeavor to Enhance your DotNetNuke designs by utilizing AJAX technologies to more efficient interactive web experiences
www.codeendeavors.com
T-WORX, INC.
Professional DotNetNuke Solutions
www.t-worx.com

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