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.0DB module development: best practice?DB module development: best practice?
Previous
 
Next
New Post
5/8/2007 9:19 AM
 

Hello,

i am currently developing some small modules that have to store data in own database tables. During development i noticed that is is not so easy to keep the database scripts (from the file: 01.00.00.SqlDataProvider) up to date when tables are changed or added to the project or new stored procedures are needed.

How do others handle this situation?

Editing tables and stored procedures "by hand" and creating the "01.00.00.SqlDataProvider" file when the development of the module is finished?

Or is it better to choose another way? Maybe there are tools that help creating and maintaining those files?

Thanks in advance,

Ralf

 

 
New Post
5/8/2007 10:27 AM
 

It can be a real pain in the rear, but from my experience, you do have to do most of it by hand. You can "script" your changes when you do make table changes, but you'll still have to go through those changes and modify them to use the databaseOwner and objectQualifier tags if you're going to create a standards compliant DNN module.

If you're starting out you can usually make all your DB changes and then create your first script using SQL enterprise manager to script out all your objects, but if you've already generated your scripts and need to create a script for a new version that updates the existing tables you will need to do some work to those so they only add/remove columns/constraints, not drop the table and data.

One thing to remember, ALWAYS put an extra line break or two after your last GO in your sqldataprovider files, if you don't they won't run properly and it's a bear to track down :)


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
5/8/2007 7:35 PM
 

Do a search on CodeSmith and DotNetNuke.

It builds your base SQL template for you - and can also code you INFO and CONTROLLER code as well.

There are versions for DAL and DAL+ around.

There is also a Blog from Michael Washington the the server here somewhere that also discusses it.

CodeSmith 2.6 is available for FREE as well.

Westa

 
New Post
5/9/2007 12:45 AM
 

rklingosmart wrote

Hello,

i am currently developing some small modules that have to store data in own database tables. During development i noticed that is is not so easy to keep the database scripts (from the file: 01.00.00.SqlDataProvider) up to date when tables are changed or added to the project or new stored procedures are needed.

How do others handle this situation?

Editing tables and stored procedures "by hand" and creating the "01.00.00.SqlDataProvider" file when the development of the module is finished?

Or is it better to choose another way? Maybe there are tools that help creating and maintaining those files?

Thanks in advance,

Ralf

 

I would suggest trying out a demo version of Redgate software's SQLCompare product, you give it a before database and an after database - and it will automatically come up with schema change scripts to migrate from one structure to the next.  For most logical data changes it'll handle the data; every now and then you need to add a little TSQL of your own, but it saves a ton of time.

 

 
New Post
5/9/2007 12:24 PM
 

It really depends on the product.  I personally write my scripts manually as I don't like using generators...and I will simply infrement my version and add a new data provider if I have DB modifications that must occur after my inital installation.  I do this to ensure that at all times I can install my module and have it update to the proper version


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0DB module development: best practice?DB module development: best practice?


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