Oke,
I tested a litle java program :
import java.sql.;
import oracle.jdbc.driver.;
class jdbctest
{
public static void main (String args )
throws SQLException
{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
(“jdbc:oracle:thin:@localhost:1521:xe”,“bis1”,“bis1”);
DatabaseMetaData meta = conn.getMetaData ();
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery
(“SELECT k1 from testcase where k1 like ‘ABC%’”);
System.out.println(“Class is SelectFromPer\n”);
System.out.println(“Found row:”);
while (rs.next()) {
String k1text = rs.getString(1);
System.out.print (" K1=" + k1text);
System.out.print(" \n");
}
stmt.close();
conn.close();
}
}
The case-insensitive search did not work with it .
I checked with Oracle and they said that the NLS parameters are not read when using thin jdbc.
So i tryed writing a database logon trigger for the user that connects from this test program and from Servoy :
create or replace trigger set_nls_onlogon
AFTER LOGON ON DATABASE
DECLARE
cmmd1 VARCHAR2(100);
cmmd2 VARCHAR2(100);
BEGIN
cmmd1:=‘ALTER SESSION SET NLS_SORT=BINARY_CI’;
cmmd2:=‘ALTER SESSION SET NLS_COMP=LINGUISTIC’;
if (user in (‘BIS1’,‘BERP’)) then
EXECUTE IMMEDIATE cmmd1;
EXECUTE IMMEDIATE cmmd2;
end if;
END set_nlslogon;
This works fine both with the test program and also when using Servoy !!!
This is a great way to do case insensitive searching in the Servoy-Oralcle environment.
Regards and thanks for the replys.
Hans Nieuwenhuis