Technical support This forum is closed.
Version 1.x > Technical support > Database Structure issue View modes: 
User avatar
Member
Member
EndangeredMassa - 7/31/2006 11:23:53 PM
   
Database Structure issue
I have written an ASP.NET User Control that acts like a simple HTML form. It allows the user to fill in data into the different fields, then click Submit. The User Control processes the data and does several SQL statements to get the entry into the Database Structure as if you entered it from the CMSDesk. This all works fine unless you try to insert a field that exceeds the column's max length, obviously.

(This is done to circumvent the CMSDesk so that users can post a job listing without going through the CMSDesk itself. Then, an administrator logs on and approves the listing. This is done with a workflow and works correctly in all other cases.)

However, I changed the database table to allow a larger number of characters for a couple columns. Now my inserts work fine up to the new character limit. But, when I try to view the page through the CMSDesk I get an error saying that the field exceeds the character limit. This is confusing me because the database table says that it allows fields to be longer than the value in question.

Does the CMSDesk check the length of the field against some other value? (The table that I am accessing is not one of the default CMS tables; it is one that I have created.)


I realize that I am being a little vague. I can go into more depth if necessary, but perhaps there is a simple answer that I am just not seeing.

User avatar
Guest
admin - 8/1/2006 4:30:31 PM
   
Re: Database Structure issue
Hello,

Thank you for your message. CMS Desk checks the size agains the form definition in CMS Desk -> Development -> Document templates - you may need to check if the field size in the Template attributes dialog is same as the size of the field in your table. If not, you may need to change the value in the Template attributes dialog.

Please let me know if it helps.

Best Regards,

User avatar
Member
Member
EndangeredMassa - 8/1/2006 4:49:36 PM
   
Re: Database Structure issue
Ah. I had forgotten about the document template. It still had the old value in there. Thanks for the information!

Although, I just realized that I also need to change the length of NodeName and NodeAlias in the CMS_Tree if possible. I am currently using a column in my new table as the 'title' of the entry which I also insert into the CMS_Tree table under NodeName and NodeAlias. However, those columns are restricted to 30 characters even though I have changed this in the design of the CMS_Tree table.

Is there a place where I could change this as well? I don't see anything in the Development tab that can help me here. If I can change these two values, everything should work out fine.



Thanks again for your help so far!

User avatar
Guest
admin - 8/1/2006 8:00:54 PM
   
Re: Database Structure issue
Hello,

unfortunately, these fields cannot be modified since their size is hard-coded in constants in the code. The NodeName and NodeAlias are intended to be used for the tree structure only. If you need to display data to the user, you should rather display the Title directly.

The NodeName and NodeAlias values are automatically trimmed. In case of NodeName, the value is ended with "..." if it's too long.

Best Regards,

User avatar
Member
Member
EndangeredMassa - 8/1/2006 8:01:52 PM
   
Re: Database Structure issue
Thanks!

I was afraid of that. I'll just have to work around it.