Fixed JS error and removed sql statement that does not work for sql-ce installations