Removed unused & broken code.
fixed bugs with oracle and sqlserver support