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.0SQL Problem - I donSQL Problem - I don't get it...
Previous
 
Next
New Post
6/12/2006 2:02 PM
 

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 2:44 PM
 
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 11:37 AM
 

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 5:48 AM
 

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
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0SQL Problem - I donSQL Problem - I don't get it...


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