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  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
SteadyRain
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.
 


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.

 


PartnerPoint | Community of Microsoft Partners
PartnerPoint is one of the largest and most active online communities of Microsoft Partners worlwide with over 8,000 members.
www.PartnerPoint.com
Web Valley
Website design, Database development
www.webvalley.com
UK DotNetNuke CMS installation, hosting & support
UK based installation, branding, customising, integration, hosting, training, support and maintenance services for DotNetNuke
www.deburca.co.uk

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