PDA

View Full Version : can't insert into database (2002)


DRIVE
12-09-2007, 11:03 PM
Any idea what could be causing this message when trying to insert or edit articles in the database?
can't insert into database (2002)

Happens on all 3 computers on the network. All have both IE 7 and FF 2 available. We dont get the messages on our home computers, just the ones that are on the network.

Didnt have this issue with V3.5, only since upgrading to 4.0. We've checked the computer clocks, browser versions, dumped all caching, etc. etc. et;al

Its one of my clients so supplementally, I am also on a network here with 8 computers and none have any problems, however, I am still inclined to think it is a network issue but havent been able to track down at exactly what point the article can't be inserted....

Hope somone has had and fixed this issue!! Will repost if/when I get some help or find a fix myself....

TIA

shketuljko
12-10-2007, 08:49 AM
Please open the support ticket for this problem.
We try to fix that problem.

DRIVE
12-11-2007, 05:07 AM
Just to close out this thread:

Thanks to the Vivvo team for taking a look.

The problem was a custom field implemented according to this how-to: http://www.vivvo.net/forums/showthread.php?t=1580

In the database I had the custome field 'source' set to 'not null', thus making it required. Certain writers (lazy ones) were not filling out the field so an article could not be inserted into the database.

Solution is to either set a default value for the custom field, set to 'null' or implement some logic that checks required fields.

I know the VTE can perform the logic on a 'required' field but am not sure what built-in parameters would be used to achieve that. Other fields (like title) give a specific error message when they are not filled in. I tend to think that the final solution should be client-side for all form-field validation to avoid a bad submission to begin with but not that big of a deal if writers follow instructions :)

Thanks again!

shketuljko
12-11-2007, 08:54 AM
No problem ;)
ENJOY

utvara
12-11-2007, 09:18 AM
Vivvo will not allow you to pass a empty (NULL) value to NOT NULL field (as you know by now :) ). For required data fields Vivvo uses generic error dump:

$missing[] = $lang->get_value('LNG_DB_' . substr($this->_sql_table, strlen(VIVVO_DB_PREFIX)) . '_' . $key);

So all error fields are later concatenated to result error message. So all you need to do is set the value for

LNG_DB_youRTABleName_fIelDnAme (case sensitive)

in your lang file.