adapted sqlserver select-form pattern