Page 1 of 1

oracle connect

Posted: 28.07.2006, 04:25
by hitman
how do i do on connection
ALTER SESSION SET NLS_LANGUAGE= 'SIMPLIFIED CHINESE' NLS_TERRITORY= 'CHINA' NLS_CURRENCY= 'RMB' NLS_ISO_CURRENCY= 'CHINA' NLS_NUMERIC_CHARACTERS= '.,' NLS_CALENDAR= 'GREGORIAN' NLS_DATE_FORMAT= 'DD-MON-RR' NLS_DATE_LANGUAGE= 'SIMPLIFIED CHINESE' NLS_SORT= 'BINARY'

Posted: 28.07.2006, 13:02
by mdaems
Hi,
I would just send it as a query to the server. Eg by using a zsqlprocessor or zquery component. If you add an after_connect event to the connection component executing the query you will be fine, I think.

Of course it would be nice if added an 'on_connect_executed_string', but then we should ad this trick for almost every event, so we will not start to add this.

However, for this case (NLS-parameters) you could try to implement it as connection options, the way we did for mysql. Add some code to TZOracleConnection.Open as is done for mysqlconnections, using the Info Tstringlist. (look for all NLS-strings in the info object and add them to the altersession statement) If you do so and tested it, you can send the patch (to SVN testing branch version or the full file!!) to the user patches forum, so that I can add it to the ZEOS package. We do appreciate this kind of help very much.
BTW, I ask you because it can better be done by an oracle user and we don't have many of them.

Mark

Posted: 29.07.2006, 00:16
by hitman
tks ,i will try