The datatype has nothing to do with this problem.
I have the following table in PostgreSQL
Table "public.foo"
Column | Type | Modifiers
--------+-----------------------+-----------------------------------------------------
my_id | bigint | not null default nextval('foo_my_id_seq'::regclass)
name | character varying(30) |
Where I inserted a value 'Bob ’ in the name column.
When I run the following query in a query tool I get the expected result back:
SELECT my_id FROM foo WHERE name = 'Bob ';
When I put Servoy (6.1) on top of this table and do a manual search on that form I don’t get anything back.
As already said in this thread Servoy does seem to strip the trailing spaces from your search criteria.
See the trace:
AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug Find executed, time: 6 thread: AWT-EventQueue-0, sql: SELECT public:foo#foo2.1073741908=my_id<-5,0,0> FROM public:foo#foo2 SV:S ((public:foo#foo2.1073741909=name<12,30,0>)=([Bob])) ORDER BY public:foo#foo2.1073741908=my_id<-5,0,0> ASC
pool-4-thread-2 INFO com.servoy.j2db.util.Debug QuerySet { prepares = <null>, select = select my_id from foo where name = ? order by my_id asc limit ? [[Bob,200]] <0^200>, cleanups = <null> }
pool-4-thread-2 INFO com.servoy.j2db.util.Debug SELECT public:foo#foo26.1073741908=my_id<-5,0,0> FROM public:foo#foo26 SV:S ((public:foo#foo26.1073741909=name<12,30,0>)=([Bob])) ORDER BY public:foo#foo26.1073741908=my_id<-5,0,0> ASC FILTER null
pool-4-thread-2 INFO com.servoy.j2db.util.Debug Analysing filters null
pool-4-thread-2 INFO com.servoy.j2db.util.Debug questiondata[1] = 201 ,type: java.lang.Integer
pool-4-thread-2 INFO com.servoy.j2db.util.Debug questiondata[0] = 'Bob' ,type: java.lang.String ,overrideType: 12
pool-4-thread-2 INFO com.servoy.j2db.util.Debug used sql select my_id from foo where name = ? order by my_id asc limit ? questiondata.length 2
pool-4-thread-2 INFO com.servoy.j2db.util.Debug QuerySet { prepares = <null>, select = select my_id from foo where name = ? order by my_id asc limit ? [[Bob,201]] <0^201>, cleanups = <null> }
pool-4-thread-2 INFO com.servoy.j2db.util.Debug SELECT public:foo#foo25.1073741908=my_id<-5,0,0> FROM public:foo#foo25 SV:S ((public:foo#foo25.1073741909=name<12,30,0>)=([Bob])) ORDER BY public:foo#foo25.1073741908=my_id<-5,0,0> ASC FILTER null
pool-4-thread-2 INFO com.servoy.j2db.util.Debug Analysing filters null 2E35BB30-3F88-4D5E-9D48-D7202102791D test
pool-4-thread-2 INFO com.servoy.j2db.util.Debug sql select SELECT public:foo#foo25.1073741908=my_id<-5,0,0> FROM public:foo#foo25 SV:S ((public:foo#foo25.1073741909=name<12,30,0>)=([Bob])) ORDER BY public:foo#foo25.1073741908=my_id<-5,0,0> ASC
AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug Search called for form 'foo'