Skip to content
Snippets Groups Projects
Commit b4e608b9 authored by Johannes Hörmann's avatar Johannes Hörmann Committed by Sophia Leierseder
Browse files

Sql-Fehler, wenn value undefined

parent 1b44062f
No related branches found
No related tags found
No related merge requests found
......@@ -18,10 +18,6 @@
<key>Company</key>
<value>Firma</value>
</entry>
<entry>
<key>Open tasks</key>
<value>Offene Aufgaben</value>
</entry>
<entry>
<key>Picture</key>
<value>Bild</value>
......@@ -30,10 +26,6 @@
<key>Office staff</key>
<value>Innendienst</value>
</entry>
<entry>
<key>Overdue tasks</key>
<value>Überfällige Aufgaben</value>
</entry>
<entry>
<key>Confirm password</key>
<value>Passwort prüfen</value>
......@@ -42,10 +34,6 @@
<key>Human Resources</key>
<value>Personal</value>
</entry>
<entry>
<key>Imminent appointments for today</key>
<value>Bevorstehende Termine für heute </value>
</entry>
<entry>
<key>Entrydate (Day)</key>
<value>Eingangsdatum (Tag)</value>
......@@ -94,10 +82,6 @@
<key>${ADDRESS_STATE}</key>
<value>Staat</value>
</entry>
<entry>
<key>New tasks</key>
<value>Neue Aufgaben</value>
</entry>
<entry>
<key>New module</key>
<value>Neuanlage</value>
......@@ -3025,7 +3009,6 @@
</entry>
<entry>
<key>Group</key>
<value>Gruppe</value>
</entry>
<entry>
<key>Combobox</key>
......@@ -3694,87 +3677,87 @@
<key>Would you like to clear the forecast and set the state to \"%0\"?</key>
</entry>
<entry>
<key>[%0]the tableName is not a string after interpreting</key>
<key>Au�er Haus</key>
</entry>
<entry>
<key>[%0]%1 has to be a string or array but it is %2</key>
<key>C�te d'Ivoire</key>
</entry>
<entry>
<key>[%0]has now an incorrect length; estimated 2 elements but got %1</key>
<key>Cura�ao</key>
</entry>
<entry>
<key>[%0]the columnName is not a string after interpreting</key>
<key>Benutzer ausw�hlen</key>
</entry>
<entry>
<key>[%0]%1 is an object but seems not to be a valid array or array-like</key>
<key>Best�tigt</key>
</entry>
<entry>
<key>Responsible</key>
<value>Verantwortlich</value>
<key>Zur�ckgestellt</key>
</entry>
<entry>
<key>Analyses</key>
<key>�land Islands</key>
</entry>
<entry>
<key>Imminent appointments for today </key>
<key>Kein Weitergeben von privaten Aufgaben m�glich!</key>
</entry>
<entry>
<key>To-Do</key>
<key>Documentmanagement</key>
</entry>
<entry>
<key>My Tasks</key>
<key>Saint Barth�lemy</key>
</entry>
<entry>
<key>Calendar</key>
<key>R�union</key>
</entry>
<entry>
<key>${SQL_LIB_UNDEFINED_VALUE} field: %0</key>
<value>Der Wert für das Feld %0 ist undefined.</value>
<key>Bitte Datumseingabe pr�fen!</key>
</entry>
<entry>
<key>Au�er Haus</key>
<key>Schl�sselwort</key>
</entry>
<entry>
<key>C�te d'Ivoire</key>
<key>Vorl�ufig</key>
</entry>
<entry>
<key>Cura�ao</key>
<key>erledigt / zur�ckgestellt</key>
</entry>
<entry>
<key>Benutzer ausw�hlen</key>
<key>[%0]the tableName is not a string after interpreting</key>
</entry>
<entry>
<key>Best�tigt</key>
<key>[%0]%1 has to be a string or array but it is %2</key>
</entry>
<entry>
<key>Zur�ckgestellt</key>
<key>[%0]has now an incorrect length; estimated 2 elements but got %1</key>
</entry>
<entry>
<key>�land Islands</key>
<key>[%0]the columnName is not a string after interpreting</key>
</entry>
<entry>
<key>Kein Weitergeben von privaten Aufgaben m�glich!</key>
<key>[%0]%1 is an object but seems not to be a valid array or array-like</key>
</entry>
<entry>
<key>Documentmanagement</key>
<key>Responsible</key>
<value>Verantwortlich</value>
</entry>
<entry>
<key>Saint Barth�lemy</key>
<key>Analyses</key>
</entry>
<entry>
<key>R�union</key>
<key>Imminent appointments for today </key>
</entry>
<entry>
<key>Bitte Datumseingabe pr�fen!</key>
<key>To-Do</key>
</entry>
<entry>
<key>Schl�sselwort</key>
<key>My Tasks</key>
</entry>
<entry>
<key>Vorl�ufig</key>
<key>Calendar</key>
</entry>
<entry>
<key>erledigt / zur�ckgestellt</key>
<key>${SQL_LIB_UNDEFINED_VALUE} field: %0</key>
<value>Der Wert für das Feld %0 ist undefined.</value>
</entry>
</keyValueMap>
<font name="Dialog" style="0" size="11" />
......
......@@ -118,12 +118,17 @@ AddressUtils.getAddressById = function(pAddressId) {
}
var type = ContactUtils.getContactTypeByContactId(address[0]);
var names = db.array(db.ROW, SqlCondition.begin()
if (address[0])
{
var names = db.array(db.ROW, SqlCondition.begin()
.andPrepare("CONTACT.CONTACTID", address[0])
.buildSql("select ORGANISATION.NAME, FIRSTNAME, LASTNAME, TITLE from CONTACT left join PERSON on PERSONID = PERSON_ID left join ORGANISATION on ORGANISATIONID = ORGANISATION_ID"
.buildSql("select ORGANISATION.NAME, FIRSTNAME, LASTNAME, TITLE from CONTACT left join PERSON on PERSONID = PERSON_ID left join ORGANISATION on ORGANISATIONID = ORGANISATION_ID"
, "1=0"));
return AddressUtils.formatAddress(type, address[1], address[2], address[3], address[4], names[0], names[1], names[2], names[3]);
return AddressUtils.formatAddress(type, address[1], address[2], address[3], address[4], names[0], names[1], names[2], names[3]);
}
return "";
}
/**
......
......@@ -376,6 +376,11 @@ SqlCondition.prototype._checkVars = function(variable) {
* @ignore
*/
SqlCondition.prototype._prepare = function(field, value, cond, fieldType) {
if (value == undefined)
{
throw new Error(translate.withArguments("${SQL_LIB_UNDEFINED_VALUE} field: %0", [field]));
}
if (cond == undefined) {
cond = "# = ?"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment