Index: /trunk/DataCheck/Sourcefile.sh
===================================================================
--- /trunk/DataCheck/Sourcefile.sh	(revision 18761)
+++ /trunk/DataCheck/Sourcefile.sh	(revision 18762)
@@ -188,9 +188,12 @@
    getdbsetup
    printprocesslog "DEBUG sendquery QUERY: "$query
-   if ! val=`mysql $sqlpwfile -s -u $us $pw --host=$ho $db -e " $query "`
-   then
-      printprocesslog "ERROR could not query DB "$db" on host "$ho" with user "$us
-      #printprocesslog "ERROR could not query db (program: $program, function sendquery)"
-      #return 1 #why???
+   val=`mysql $sqlpwfile -s -u $us $pw --host=$ho $db -e " $query " 2>&1`
+   checkmysql=`echo $?`
+   if [ $checkmysql -gt 0 ]
+   then
+      printprocesslog "ERROR could not query DB "$db" on host "$ho" with user "$us" (program: $program, function sendquery) "
+      printprocesslog "MYSQLERROR [returncode: "$checkmysql"] "$val
+      error=`echo $val | grep -E -o 'ERROR [1-9]{1,4}' | grep -E -o '[1-9]{1,4}'`
+      # here possible reaction to mysql error
       finish
    fi
