I am having much success integrating (finally) views in my solution, mostly for easy searching. However, I just hit one that looks like a bug?
I have a view defined as follows in SQL Server 2005:
SELECT pd.proj_id, vp.proj_nbr, vp.subproj_nbr, pd.projphase_id, pd.phase_id, p.phase_desc, S.forecast_date, S.actual_date, S.target_date, S.datetype_id,
S.reason, S.auto_yn, S.FCcontract_id, C.contract_nbr, S.update_date
FROM dbo.TblProj03PhaseDate AS pd LEFT OUTER JOIN
dbo.TblLookup23Phase AS p ON pd.phase_id = p.phase_id LEFT OUTER JOIN
dbo.TblProj11Schedule AS S ON pd.projphase_id = S.projphase_id LEFT OUTER JOIN
dbo.ViewAllProject AS vp ON pd.proj_id = vp.proj_id LEFT OUTER JOIN
dbo.ViewContract AS C ON S.FCcontract_id = C.contract_id
When I try to do a search on a form attached to this view in Servoy – even manually, without a method, I get incorrect results from the phase_id field. Phase ID is an integer between 0 and 7. Hit control-F, put 6 in phase_id, hit F3, and I get results with phase_id = anything in the database. Similarly, when i try to search in phase_desc (which have words that correspond to the 0-7 phase_ids) I type %Land% and get all rows in the database, including words like “Development” etc.
Can one not search views safely/successfully in all cases? I am searching very successfully on actual_date, target_date, and forecast_date.