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.0ModuleSettings SettingValue field data typeModuleSettings SettingValue field data type
Previous
 
Next
New Post
7/7/2008 4:33 AM
 

I was wondering if someone could help me with modifying ModuleSettings SettingValue field data type from nvarchar to text. I have to save large amount of data in that field for my custom made module and it would be a lot easier if I just change field type. I already modified stored procedures and field type but there is no change in outcome. Everything is working normal as before but I cannot save more than 4000 characters (and the field is now defined as text) in that SettingValue column. I can save it using enterprise manager but when I load settings inside code it only returns 4000 characters. I searched the code for possible restrictions but I haven't found it.

 
New Post
7/7/2008 4:56 PM
 

If I understand it correctly you would like to save more than 4000 characters in the SettingValue field in the moduleSettings table. This field is restricted in the database to 2000 characters max. I would advise against changing this as it is always good practice not to change any of Dotnetnuke's core, which in my opinion also includes the database. But you could change this value to reflect the amount needed.

Why not create a custom table for this module and save the module specific data here?

Stephan
www.mexmax-internet.com

 
New Post
7/7/2008 9:48 PM
 

Al,

I had a similar problem but only needed a little bit more space ... so I zipped the data in the field.  Zip can give you up to 70% compression on average text data..  So,  you could store up to 10,000 characters or so.  All depends on the data. 

Since DNN already references a Zip library (ICSharpCode.SharpZipLib.BZip2), it was relatively easy to call the zip routine prior to storing the data, as unzipping when referencing it .   

I STRONGLY recommend NOT changing this table in the Core.  As many modules depend on this table for their presistency of data and may have trouble is the table is changed.   Besides, you will need to "fix" the table during every upgrade .. ugh! ..

Try the following to compress ... InValue is the string to be compressed and CompressBuffer is the compressed result.

oCompressMemory = New System.IO.MemoryStream
zosCompressed = New BZip2OutputStream(oCompressMemory)

byteBuffer = System.Text.Encoding.ASCII.GetBytes(InValue)
zosCompressed.Write(byteBuffer, 0, byteBuffer.Length)

zosCompressed.Finalize()
zosCompressed.Close()

byteBuffer = oCompressMemory.ToArray()
CompressBuffer = Convert.ToBase64String(byteBuffer)

Give it a try and see if that helps.  Search thru the DNN Source for lots of examples...
Paul.

EDIT:  Just notice that also encoded the result into Base64  string ... that's not really required, but insures the string only contain "printable"  character .. this will make the string a bit longer then the raw compressed data.

 
New Post
7/8/2008 11:06 AM
 

I would like to stress the importance of the comments above regarding NOT customizing this table.  Making changes to the table puts you at risk of breaking multiple things, as many modules use it, and upgrades in the future might have problems.


-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.0ModuleSettings SettingValue field data typeModuleSettings SettingValue field data type


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