Can I change the the Datatype of Column Body of table BlogPost in Nopcommerce Database? - entity-framework-4

I want to post my blog in my store which is of Nopcommerce and the size of my blog contents is greater than 4000 characters.
Now I want to change that limit but it does not allow me change the datatype or the size of current datatype which is string.
I have tried to change it from BlogPostMap file, but it does not work for me.
Can anyone suggest me how to solve this problem?
Thanks in anticipation.

There is no limit to blog post sizes, nor in the database nor in the code. The database definition for body is NVARCHAR(MAX) and you don't need to modify the BlogPostMap file.
The problem is somewhere else. Are you using the nopCommerce interface or creating blogs using a custom process?
Maybe a problem with Management Studio? Check this:
SQL Server Text Datatype Maxlength = 65,535?

Related

Retrieving data in table using Web Safe URL title

I am looking for another solution in retrieving a data from the table using a web-safe url
here is a rough example of my url:
https://example.com/this-is-the-blog-title-and-has-no-unallowed-characters
Another example is how quora uses this kind of method in their url structures.
https://www.quora.com/How-far-is-the-Moon-from-Earth
The solution I used is to store a web-safe version of the "title" in the table under the column name "web_safe_title".
Acutal blog title:
What's the distance of the moon from earth?
Web safe title: whats-the-distance-of-the-moon-from-earth
and the web safe title is what I use for anchor tags and for retrieving the data from the table.
The problem though is that, I personally think that the way that I did it is not efficient especially when a time comes where I have to change the actual title of the blog post. If i change the title, I would also change the web-safe title to match the new one, thus making previous/older links that uses it obsolete.
I just want to know if there is a more efficient way of doing this.
I am using CodeIgniter version 3.1.8 and MySQL for my database.
Note: I do not want to use the "id" of the post in the url to retrieve the data. I want it to be clean, only the site name and the blog title for the url.
Use the below routing to fix your problem. change the controller name and function name as per your class.
$route['(:any)'] = 'controller_name/function_name/$1';

Persian words changed to ??? in Orchard

I've build an orchard site on my local machine. this site is in three language and on my local computer every this is good.
But after I published my site on remote server; for example when I want to add a new page in Persian language, after saving word to database every words changed to ????.
site address is http://modernsaraylar.com/ and I don't know how to fix it.
by the way, I have put all of the tables collation to utf8-persian-ci but it doesn't work :(
TNX in advance.
In SQL then you will have to change the column type should be changed to nvarchar instead of varchar
add "CharSet=utf8" at the end of connection string and it solved the problem. It you use MySQL you will have this problem.

Saving / Retrieving DBGrid column settings: Columns.LoadFromStream and Columns.SaveToStream

I am actually after some ideas to how to address my problem below:
I have TCRTBGrid that users can move columns around and change the width. I want to save the setting in a database. I guess I can do this bit by using
Columns.LoadFromStream and Columns.SaveToStream
then store data in a blob field - Q: Can I store in a longtext field ?
but the biggest problem is that if new columns were added during design time after saving the column settings i want to append these new columns to the end.
Any suggestions ?
Thanks.
I did what Ravaut123 suggested and worked !!!!!!
Once retrieved the user setting , compared it with design grid manually for new and deleted fields 'cause that is only way I could think of.
Anyway thank you to both Ravaut123 and kobik.

Capturing Field Name Metadata from a CSV File in Altova MapForce

I've been asked to prototype a replacement "file transformation process" (that currently is a mess of SQL) using Altova's MapForce. My input is a CSV file with headers. My problem is that I need to capture both the data AND the column name to use in downstream processing.
I need to have MapForce feed a C# method (imported as that takes two parameters: fieldName and value. I can access the value trivially, but after hours pouring over the manual (1000 pages!) I haven't found any examples of how to access the field name as an output.
The reason each output needs the field name and the value has to do with how all our mappings/transformations are currently managed - on a database. The .NET code jumps in at this point and does any necessary database lookups.
For example, if I had the following file:
"Symbol", "Account", "Price", ...
"FOO", "10101", "1.23", ...
"BAR", "10201, "13.56", ...
And a static method string TransformField( string fieldName, string value ),
I'd like to map the CSV file's Symbol data output to the method's value parameter and the Field Name "Symbol" to the method's fieldName parameter.
Some limitations:
I need to keep the "wiring" visible in the MapForce GUI. I'll have non-programmers maintaining the mappings in the future. So doing all this in code is not an option.
MapForce is the tool of choice by the company. Part of the reason our original process is such a mess is because the original programmer rolled his own mapping/transformation tool (out of TSQL no less - ouch).
We can treat all inputs/outputs to the method call as strings. Conversions will happen later.
I would like to avoid using scalar literals as inputs. I already have the column names from the file - I do not want to re-type each one and feed it to my method.
I'm not sure how many users out there have experience with this tool, but after 3 days of tinkering with it, I see much potential. If only I can get past this current sticking point, I think the company will have a solid alternative to their current mess.
Thanks for any/all suggestions.
I solved my issue and, for future reference, want to post a solution. I handled my problem by using MapForce's FlexText. This allowed me to extract the header from the CSV file and "invert" the column names as data inputs to the transformation process. Once I knew the approach to take, I was able to find more information directly from Altova.
I found a couple helpful tutorials while digging through their website:
Altova Online Videos
Web Tutorial
Hope this can help someone else in the future!

How to design a system like google base with dynamic attributes? in Ruby on Rails

I am wanting to create an application that can allow users to add products for sale.
I want to make it so that a user can add whatever type of product he/she likes and let them also create stored and searchable attributes for their products - alot like google base does.
Does anyone know of the best way to do this ie model it.
I don't really want a table for each category as this would be possibly 1000s of tables.
What is the best way to do this? has anyone got good / bad experiences of this?
Is there any plugins that does this?
Any help would be great
thanks
rick
It sounds like what you want is a tag system.
If you want something more flexible you might want to look at using a document store instead of a database, for example CouchDB.
If you don't want to keep this in a relational database I'd suggest creating a Model called "Descriptor" that would contain the ID of the item being added, the name of the attribute "Color" and the value "Red".
To help keeps things consistent you could also structure pre-set groups of descriptors (for cars: make, model, color) as well as provide auto-completes for the value entry text fields.

Resources