SQLWriter nearly works now