Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: alter session

Re: alter session

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Tue, 3 Nov 1998 07:45:15 +0200
Message-ID: <71m5dl$l0p$1@hermes.is.co.za>


Detlev Goebel wrote in message <363DD1E4.FE221178_at_www.gzs.de>...

>we have a connection to oracle 7.3 via ODBC. Now we like to have an
>alter session command to the database.
>The ODBC driver isn't capabla to provide SQLP Plus Commands to the
>server, login.sql works with sqlplus.

Yes, if by that you mean SQL*Plus specific commands like DESCR, SET, SPOOL etc. However, the ALTER SESSION is an Oracle SQL command.

>Is there any idea to do an alter session command within a profile or
>something similar ?

ODBC drivers (should?) use the current PC's regional settings to set the date format, currency format etc. If you trace the ODBC calls made (or even better, sniff the ODBC network traffic), you'll see what ODBC does when it connects to a database. (and this can be scary sometimes, especially if you do not use the correct "method" in Visual Basic!)

With Oracle SQL you can however change any of the NLS parameters useing the ALTER SESSION SQL command. If you get an error executing this command in VB (or whatever language you're using) then you either have the syntax wrong, or you're attempting to run the SQL command as if it's returning a cursor handle (like with a SELECT command). Simply run the ALTER SESION command using the EXECSQL or whatever method is used to run a DDL command.

regards,
Billy Received on Mon Nov 02 1998 - 23:45:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US