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.0Problem with DB owner abd objestqualifr in DB scriptsProblem with DB owner abd objestqualifr in DB scripts
Previous
 
Next
New Post
1/28/2009 10:38 PM
 

I've having a problem where my .Install script works manuall when I replace {ObjectQualifier} and {Databaseowner} with "", but not in the module installation. I'm getting errors that lead me to beleive the search / replace that DNN is doing isn't what I understand. I have a table like this:

IF OBJECT_ID(N'{DatabaseOwner}[{ObjectQualifer}Interface]') IS NULL
BEGIN
    CREATE TABLE {DatabaseOwner}[{ObjectQualifer}Interface] (
  [PortalId] INT NOT NULL ,
  [InterfaceId] INT IDENTITY (1, 1) NOT NULL ,
  [ComponentId] INT NOT NULL ,
  [InterfaceTypeId] INT NOT NULL ,
  [InternalName] NCHAR(10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  [ExternalLabel] NCHAR(10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  [GUID] NCHAR(10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  [Comment] NVARCHAR(50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  [ConnectionId] INT NULL ,
  [Version] TIMESTAMP NULL
    ) ON [PRIMARY]
END


EXEC dbo.sp_addextendedproperty N'MS_Description', N'Portal identifier', N'user', N'{DatabaseOwner}', N'TABLE', N'{ObjectQualifier}Interface', N'COLUMN', N'PortalId'
EXEC dbo.sp_addextendedproperty N'MS_Description', N'Unique interface identifier', N'user', N'{DatabaseOwner}', N'TABLE', N'{ObjectQualifier}Interface', N'COLUMN', N'InterfaceId'
EXEC dbo.sp_addextendedproperty N'MS_Description', N'Component identifier', N'user', N'{DatabaseOwner}', N'TABLE', N'{ObjectQualifier}Interface', N'COLUMN', N'ComponentId'
EXEC dbo.sp_addextendedproperty N'MS_Description', N'Interface type', N'user', N'{DatabaseOwner}', N'TABLE', N'{ObjectQualifier}Interface', N'COLUMN', N'InterfaceTypeId'
EXEC dbo.sp_addextendedproperty N'MS_Description', N'Internal name for interface', N'user', N'{DatabaseOwner}', N'TABLE', N'{ObjectQualifier}Interface', N'COLUMN', N'InternalName'
EXEC dbo.sp_addextendedproperty N'MS_Description', N'Eternal label for interface', N'user', N'{DatabaseOwner}', N'TABLE', N'{ObjectQualifier}Interface', N'COLUMN', N'ExternalLabel'
EXEC dbo.sp_addextendedproperty N'MS_Description', N'GUID or MAC for interface', N'user', N'{DatabaseOwner}', N'TABLE', N'{ObjectQualifier}Interface', N'COLUMN', N'GUID'
EXEC dbo.sp_addextendedproperty N'MS_Description', N'Interface identifier of remote connection', N'user', N'{DatabaseOwner}', N'TABLE', N'{ObjectQualifier}Interface', N'COLUMN', N'ConnectionId'
EXEC dbo.sp_addextendedproperty N'MS_Description', N'Version timestamp for concurrency control', N'user', N'{DatabaseOwner}', N'TABLE', N'{ObjectQualifier}Interface', N'COLUMN', N'Version'
GO

It's looking to me like the N'*** items are not being translated. If there a good reference for the proper guidelines for converting a SQL Management Studio script that includes foriegn keys and extended attributes to somethign the DNN will install properly?

 

 

 

 
New Post
1/29/2009 12:49 AM
 

What are the settings for the DB owner and object qualifier in web.config?  Are they what you intend them to be?

 
New Post
1/29/2009 2:16 PM
 

The settings are defaults. The isntallation is into a virgin DNN installation I use for a test bed. In this case I would expect the database owner to end up being either blank or dbo and the object qualifier is nothing (blank). Items with outextended properties work fine.

For example the normal table creates would look like this:

CREATE TABLE [dbo].[Instance](
    [PortalId] [int] NOT NULL CONSTRAINT [DF_Instance_PortalId]  DEFAULT ((0)),
-edited  for brevity-
    [Version] [timestamp] NOT NULL,
 CONSTRAINT [PK_Instance] PRIMARY KEY NONCLUSTERED
(
    [InstanceId] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Portal identifier' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Instance', @level2type=N'COLUMN',@level2name=N'PortalId'
GO
 

The issue I need some clarity on is the proper "DNN" way of making those work with a standard module isntallation and the dbo and oq tags. For example if I was going to use an object qualifier of CPM I would expect the create to llok like this:

CREATE TABLE [dbo].[CPMInstance](
    [PortalId] [int] NOT NULL CONSTRAINT [DF_CPMInstance_PortalId]  DEFAULT ((0)),
-edited  for brevity-
    [Version] [timestamp] NOT NULL,
 CONSTRAINT [PK_CPMInstance] PRIMARY KEY NONCLUSTERED
(
    [InstanceId] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Portal identifier' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CPMInstance', @level2type=N'COLUMN',@level2name=N'PortalId'
GO

Since today I don't need an object qualifier, changing the {DatabaseOwner} and {ObjectQualifier} to spaces or simply not using the tags at all in the SQL works. I can't count on that long term, but don't see any examples in the modules I've reviewed that take into account the circumstances I've noted above taht show me how to it properly.

 
New Post
1/29/2009 9:46 PM
 

Keith,

{databaseOwner} & {objectQualifier} is case sensitive AFAIR. Also remember to make your .SqlDataProvider UTF 8 encoded.

HTH's,

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Problem with DB owner abd objestqualifr in DB scriptsProblem with DB owner abd objestqualifr in DB scripts


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