Replacing SqlDbType with DbType

Changed all parameters to use DbType instead which I thought I had
already done.   Various other tweaks and fixes.