cx-oracle-users Mailing List for cx_Oracle (Page 47)
Brought to you by:
atuining
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(9) |
Sep
(8) |
Oct
(12) |
Nov
(4) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(15) |
Feb
(12) |
Mar
(11) |
Apr
(5) |
May
(7) |
Jun
(8) |
Jul
(12) |
Aug
(2) |
Sep
(14) |
Oct
(17) |
Nov
(20) |
Dec
(3) |
2005 |
Jan
(16) |
Feb
(9) |
Mar
(22) |
Apr
(21) |
May
(73) |
Jun
(16) |
Jul
(15) |
Aug
(10) |
Sep
(32) |
Oct
(35) |
Nov
(22) |
Dec
(13) |
2006 |
Jan
(42) |
Feb
(36) |
Mar
(13) |
Apr
(18) |
May
(8) |
Jun
(17) |
Jul
(24) |
Aug
(30) |
Sep
(35) |
Oct
(33) |
Nov
(33) |
Dec
(11) |
2007 |
Jan
(35) |
Feb
(31) |
Mar
(35) |
Apr
(64) |
May
(38) |
Jun
(12) |
Jul
(18) |
Aug
(34) |
Sep
(75) |
Oct
(29) |
Nov
(51) |
Dec
(11) |
2008 |
Jan
(27) |
Feb
(46) |
Mar
(48) |
Apr
(36) |
May
(59) |
Jun
(42) |
Jul
(25) |
Aug
(34) |
Sep
(57) |
Oct
(97) |
Nov
(59) |
Dec
(57) |
2009 |
Jan
(48) |
Feb
(48) |
Mar
(45) |
Apr
(24) |
May
(46) |
Jun
(52) |
Jul
(52) |
Aug
(37) |
Sep
(27) |
Oct
(40) |
Nov
(37) |
Dec
(13) |
2010 |
Jan
(16) |
Feb
(9) |
Mar
(24) |
Apr
(6) |
May
(27) |
Jun
(28) |
Jul
(60) |
Aug
(16) |
Sep
(33) |
Oct
(20) |
Nov
(39) |
Dec
(30) |
2011 |
Jan
(23) |
Feb
(43) |
Mar
(16) |
Apr
(29) |
May
(23) |
Jun
(16) |
Jul
(10) |
Aug
(8) |
Sep
(18) |
Oct
(42) |
Nov
(26) |
Dec
(20) |
2012 |
Jan
(17) |
Feb
(27) |
Mar
|
Apr
(20) |
May
(18) |
Jun
(7) |
Jul
(24) |
Aug
(21) |
Sep
(23) |
Oct
(18) |
Nov
(12) |
Dec
(5) |
2013 |
Jan
(14) |
Feb
(10) |
Mar
(20) |
Apr
(65) |
May
(3) |
Jun
(8) |
Jul
(6) |
Aug
(3) |
Sep
|
Oct
(3) |
Nov
(28) |
Dec
(3) |
2014 |
Jan
(3) |
Feb
(9) |
Mar
(4) |
Apr
(7) |
May
(20) |
Jun
(2) |
Jul
(20) |
Aug
(7) |
Sep
(11) |
Oct
(8) |
Nov
(6) |
Dec
(12) |
2015 |
Jan
(16) |
Feb
(10) |
Mar
(14) |
Apr
(8) |
May
|
Jun
(8) |
Jul
(15) |
Aug
(7) |
Sep
(1) |
Oct
(33) |
Nov
(8) |
Dec
(5) |
2016 |
Jan
(18) |
Feb
(12) |
Mar
(6) |
Apr
(14) |
May
(5) |
Jun
(3) |
Jul
|
Aug
(21) |
Sep
|
Oct
(15) |
Nov
(8) |
Dec
|
2017 |
Jan
|
Feb
(14) |
Mar
(21) |
Apr
(9) |
May
(6) |
Jun
(11) |
Jul
(23) |
Aug
(6) |
Sep
(5) |
Oct
(7) |
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(16) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2020 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(3) |
2021 |
Jan
|
Feb
(5) |
Mar
|
Apr
(7) |
May
(6) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Zane A. <zan...@ya...> - 2010-12-13 22:19:58
|
Hi Please advise if source is available for cx_oracle to be compiled on AIX6.1 running Oracle 11.2 64bit. Have some problems compiling this on the system above on a IBM Power7 Server. Is this the issue with Oracle11.2 not having 32bit libraries? I do not see any lib32 libraries in my Oracle 11.2 Enterprise Edition install on AIX6.1 Please assist Thanks Zane |
From: Anthony T. <ant...@gm...> - 2010-12-07 05:31:36
|
Hi, I don't see the problem you are having just by looking at it. All __looks__ right. Are you able to successfully use the same code as is found in the LongVar test code? cursor.setinputsizes(longString = cx_Oracle.LONG_BINARY) cursor.execute(""" insert into TestLongRaws ( IntCol, LongRawCol ) values ( :intVal, :longString )""", intVal = 5, longString = "A" * 25000) The likelihood is that perhaps msg_id is an integer but you are passing sys_guid() to it which is a raw (BINARY) value? Slowly remove bits of the code until the problem goes away as the code you have should in theory work -- I use similar code regularly enough! Anthony On Mon, Dec 6, 2010 at 11:34 AM, Jeffrey Melloy <jm...@gm...> wrote: > I'm having trouble inserting a long raw into a table. > My update statement is this: > insert = """insert into amazonmp.transmission_in (msg_id, key_value, > key_value2,msg_body) > values (sys_guid(), :ref_id, :resp_id, :msg_body)""" > After doing this: > upd.setinputsizes(msg_body=cx_Oracle.LONG_BINARY) > upd.execute(insert, {"msg_body":doc.xml_encode(), "ref_id":ref_id, > "resp_id":str(id)}) > I always get this error: > cx_Oracle.DatabaseError: ORA-00932: inconsistent datatypes: expected NUMBER > got BINARY > Any help would be appreciated. > This is using cx_Oracle 5.03 connecting to a 10g DB. > -Jeff > ------------------------------------------------------------------------------ > What happens now with your Lotus Notes apps - do you make another costly > upgrade, or settle for being marooned without product support? Time to move > off Lotus Notes and onto the cloud with Force.com, apps are easier to build, > use, and manage than apps on traditional platforms. Sign up for the Lotus > Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Jeffrey M. <jm...@gm...> - 2010-12-06 18:35:04
|
I'm having trouble inserting a long raw into a table. My update statement is this: insert = """insert into amazonmp.transmission_in (msg_id, key_value, key_value2,msg_body) values (sys_guid(), :ref_id, :resp_id, :msg_body)""" After doing this: upd.setinputsizes(msg_body=cx_Oracle.LONG_BINARY) upd.execute(insert, {"msg_body":doc.xml_encode(), "ref_id":ref_id, "resp_id":str(id)}) I always get this error: cx_Oracle.DatabaseError: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY Any help would be appreciated. This is using cx_Oracle 5.03 connecting to a 10g DB. -Jeff |
From: Waldemar O. <wal...@gm...> - 2010-12-05 22:06:33
|
On Sat, Dec 4, 2010 at 13:33, Robert <web...@gm...> wrote: > Does cx_oracle have a method or is there a module that can print > result set like SQL*Plus does ? > Consider http://packages.python.org/sqlpython/ |
From: Robert <web...@gm...> - 2010-12-04 20:33:54
|
Does cx_oracle have a method or is there a module that can print result set like SQL*Plus does ? |
From: Ian K. <ian...@gm...> - 2010-12-02 23:11:41
|
On Thu, Dec 2, 2010 at 4:06 PM, Amaury Forgeot d'Arc <ama...@gm...> wrote: > 2010/12/2 Ian Kelly <ian...@gm...> >> >> AFAICT, the solution suggested there is not viable in Python because >> Pywin32 does not build under Cygwin. > > You can still use the ctypes module: >>>> import ctypes >>>> ctypes.CDLL('kernel32').SetEnvironmentVariableA('NLS_LANG', '.UTF8') Yep, that does the trick. Thanks! |
From: Amaury F. d'A. <ama...@gm...> - 2010-12-02 23:07:05
|
2010/12/2 Ian Kelly <ian...@gm...> > AFAICT, the solution suggested there is not viable in Python because > Pywin32 does not build under Cygwin. > You can still use the ctypes module: >>> import ctypes >>> ctypes.CDLL('kernel32').SetEnvironmentVariableA('NLS_LANG', '.UTF8') -- Amaury Forgeot d'Arc |
From: Ian K. <ian...@gm...> - 2010-12-02 23:00:50
|
On Thu, Dec 2, 2010 at 3:47 PM, Amaury Forgeot d'Arc <ama...@gm...> wrote: > Hi, > > 2010/12/2 Ian Kelly <ian...@gm...> >> >> I can't seem to change the client encoding used by cx_Oracle. I've tried >> this: >> >> $ export NLS_LANG=.UTF8 > > IIRC an underscore is required in NLS_LANG: > $ export NLS_LANG=_.UTF8 No, the underscore is only necessary if you specify the territory (e.g. "_AMERICA.UTF8"). Thanks, though. |
From: Ian K. <ian...@gm...> - 2010-12-02 22:59:18
|
On Thu, Dec 2, 2010 at 3:29 PM, Ian Kelly <ian...@gm...> wrote: > I can't seem to change the client encoding used by cx_Oracle. Looks like this is the same problem: http://rubyforge.org/forum/forum.php?thread_id=6826&forum_id=1078 AFAICT, the solution suggested there is not viable in Python because Pywin32 does not build under Cygwin. On the bright side, it turns out that I was wrong about setting the NLS_LANG in the registry not working -- I was just setting it in the wrong place (the peril of having four different Oracle homes). That seems a bit draconian just to get one Python app working, however, so I would appreciate any other suggestions. Thanks, Ian |
From: Amaury F. d'A. <ama...@gm...> - 2010-12-02 22:47:39
|
Hi, 2010/12/2 Ian Kelly <ian...@gm...> > I can't seem to change the client encoding used by cx_Oracle. I've tried > this: > > $ export NLS_LANG=.UTF8 > IIRC an underscore is required in NLS_LANG: $ export NLS_LANG=_.UTF8 -- Amaury Forgeot d'Arc |
From: Ian K. <ian...@gm...> - 2010-12-02 22:30:33
|
Using: Cygwin 2.721 under Windows XP SP3 Python 2.5.5 cx_Oracle 5.0.3 Oracle 10.2.0 I can't seem to change the client encoding used by cx_Oracle. I've tried this: $ export NLS_LANG=.UTF8 $ python Python 2.5.5 (r255:77872, Mar 15 2010, 00:43:13) [GCC 4.3.4 20090804 (release) 1] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.environ['NLS_LANG'] '.UTF8' >>> import cx_Oracle >>> conn = cx_Oracle.connect('ikelly/ikelly@xe') >>> conn.encoding, conn.nencoding ('WINDOWS-1252', 'WINDOWS-1252') I've also tried fiddling with the NLS_LANG registry setting, also to no effect. Any ideas? Thanks, Ian |
From: Sébastien S. <sa...@us...> - 2010-11-19 13:55:23
|
Hi Anurag, just for information, I have no problem compiling cx_Oracle 5.0.4 on AIX 5.3 (or AIX 6.1) with xlc_r: cx_Oracle-5.0.4\> python setup.py build running build running build_ext building 'cx_Oracle' extension creating build creating build/temp.aix-5.3-2.6-10g xlc_r -DNDEBUG -O -O2 -I/home/cis/build-dir/RT26AIX53-SUP/target/support/include -I/home/cis/build-dir/RT26AIX53-SUP/target/support/include/ncurses -I/home/cis/build-dir/RT26AIX53-SUP/target/support/include -I/oracle/product/10.2.0/rdbms/demo -I/oracle/product/10.2.0/rdbms/public -I/home/cis/build-dir/RT26AIX53-SUP/target/support/include/python2.6 -c cx_Oracle.c -o build/temp.aix-5.3-2.6-10g/cx_Oracle.o -DBUILD_VERSION=5.0.4 creating build/lib.aix-5.3-2.6-10g /home/cis/build-dir/RT26AIX53-SUP/target/support/lib/python2.6/config/ld_so_aix xlc_r -bI:/home/cis/build-dir/RT26AIX53-SUP/target/support/lib/python2.6/config/python.exp -L/home/cis/build-dir/RT26AIX53-SUP/target/support/lib -L/home/cis/build-dir/RT26AIX53-SUP/target/support/lib -L/oracle/product/10.2.0/lib32 -O2 -I/home/cis/build-dir/RT26AIX53-SUP/target/support/include -I/home/cis/build-dir/RT26AIX53-SUP/target/support/include/ncurses -I/home/cis/build-dir/RT26AIX53-SUP/target/support/include build/temp.aix-5.3-2.6-10g/cx_Oracle.o -L/oracle/product/10.2.0/lib32 -L/oracle/product/10.2.0 -lclntsh -o build/lib.aix-5.3-2.6-10g/cx_Oracle.so regards -- Sébastien Sablé Le 18/11/2010 07:31, Anurag Chourasia a écrit : > I can confirm that I was able to solve this. Following your advice I > continued compiling and with gcc it finally worked. I don't care if it > does not compile with xlc_r.......gcc compiles it best. > > Thanks for all your guidance. > > Regards, > Anurag |
From: Euan J. <eu...@pr...> - 2010-11-19 11:15:22
|
Mark, Thanks for that! Much appreciated. I'll look it over and see if it helps. Our solution is basically Django and cx_Oracle on top of Oracle. The TNS_Names entry has the "load-balanced" details. My actual question, is if cx_Oracle does the load balancing itself, or do I need to code the balancer on-top of cx_Oracle? If so, do you have some code-samples you are willing to share? Kind regards and thanks again for your assistance! -- *EUAN JONKER* | SENIOR ARCHITECT *PRAEKELT*.COM | *PRAEKELTFOUNDATION*.ORG *M*: +27 (0) 83 400 2042 | *T*: +27 (0) 21 447 0471 | *S*: euanjonker On 19 November 2010 13:06, Mark Harrison <mh...@pi...> wrote: > On 11/19/10 1:12 AM, Euan Jonker wrote: > > HI, > > > > We've got cx_Oracle installed running on Django. It rocks! > > Thanks for the awesome software! > > > > I have a question though. > > Does it support database load-balancing? > > Do you mean RAC-style load balancing? If so, the answer is > yes, since cx_Oracle sits on top of OCI. > > Here's a presentation I made regarding TAF (transparent > application failover). It works perfectly, and all the > examples use cx_Oracle. > > http://markharrison.net/taf/taf-round-the-world.mov > > http://markharrison.net/taf/taf-coding-harrison.pdf > > http://markharrison.net/taf > > HTH! > Mark > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Mark H. <mh...@pi...> - 2010-11-19 11:06:11
|
On 11/19/10 1:12 AM, Euan Jonker wrote: > HI, > > We've got cx_Oracle installed running on Django. It rocks! > Thanks for the awesome software! > > I have a question though. > Does it support database load-balancing? Do you mean RAC-style load balancing? If so, the answer is yes, since cx_Oracle sits on top of OCI. Here's a presentation I made regarding TAF (transparent application failover). It works perfectly, and all the examples use cx_Oracle. http://markharrison.net/taf/taf-round-the-world.mov http://markharrison.net/taf/taf-coding-harrison.pdf http://markharrison.net/taf HTH! Mark |
From: Euan J. <eu...@pr...> - 2010-11-19 09:37:55
|
HI, We've got cx_Oracle installed running on Django. It rocks! Thanks for the awesome software! I have a question though. Does it support database load-balancing? We seem to have difficulty getting it to work. Any ideas? Kind regards, -- *EUAN JONKER* | SENIOR ARCHITECT *PRAEKELT*.COM | *PRAEKELTFOUNDATION*.ORG *M*: +27 (0) 83 400 2042 | *T*: +27 (0) 21 447 0471 | *S*: euanjonker |
From: Mark H. <mh...@pi...> - 2010-11-18 19:02:27
|
On 11/18/10 10:55 AM, Robert wrote: > How to find out number of rows affected by UPDATE/DELETE... ? > > thanks curs.rowcount should do it: curs.execute('update t1 set a=2') print curs.rowcount There's a few other handy things in the cursor class as well. |
From: Robert <web...@gm...> - 2010-11-18 18:55:53
|
How to find out number of rows affected by UPDATE/DELETE... ? thanks On Thu, Nov 18, 2010 at 12:34 PM, Mark Harrison <mh...@pi...> wrote: > On 11/17/10 10:14 PM, Robert wrote: >> I searched "cx_Oracle-doc" folder for UPDATE examples but can not find >> any. (even Google can't seem to find any, sigh) >> >> please provide an UPDATE example (with parameters) > > try one of these: > > > # execute with positional parameter :1=first, :2=second, etc > curs.execute('select :1 * :2 from dual',[2,4]) > print curs.fetchone()[0] > > # execute with named parameter : > curs.execute('select :x * :y from dual',x=2,y=5) > print curs.fetchone()[0] > > > > > more cx_Oracle examples at: > > http://markharrison.net/cx-oracle-demos > > > HTH! > Mark > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Mark H. <mh...@pi...> - 2010-11-18 17:34:48
|
On 11/17/10 10:14 PM, Robert wrote: > I searched "cx_Oracle-doc" folder for UPDATE examples but can not find > any. (even Google can't seem to find any, sigh) > > please provide an UPDATE example (with parameters) try one of these: # execute with positional parameter :1=first, :2=second, etc curs.execute('select :1 * :2 from dual',[2,4]) print curs.fetchone()[0] # execute with named parameter : curs.execute('select :x * :y from dual',x=2,y=5) print curs.fetchone()[0] more cx_Oracle examples at: http://markharrison.net/cx-oracle-demos HTH! Mark |
From: Guilherme M. <gui...@gm...> - 2010-11-18 16:24:00
|
Ok Anthony, thank you for answering. I guess I will continue to work using the WITH_UNICODE flag for now, since I am also using SqlAlchemy and thus I have no control over how strings are passed to cx_Oracle. Regards, Guilherme. On Thu, Nov 18, 2010 at 2:11 PM, Anthony Tuininga <ant...@gm...> wrote: > Hi, > > Yes, internally unicode objects are passed through to Oracle as UTF-16 > rather than encoding them in the encoding specified by NLS_LANG. You > can, of course, feel free to encode yourself but I understand that can > be a bit of a pain. I do have plans to see what the implications of > throwing away "Unicode" mode and any attempt to use UTF-16 and simply > encoding all strings as they are passed to Oracle -- but I have had no > time in the past few months. I'm hopeful that things might get a > little less crazy in the next few weeks.... > > Anthony > > On Wed, Nov 17, 2010 at 9:58 AM, Guilherme Menezes > <gui...@gm...> wrote: >> Hi, >> >> I am having an encoding issue using Python 2.6.2, cxOracle 5.0.4 to >> access an Oracle 11g database. >> >> I am using the NLS_LANG=.AL32UTF8 environment variable. My table in >> Oracle is correctly configured to accept Unicode. >> >> I compiled cxOracle without the WITH_UNICODE flag and passed unicode() >> objects to cxOracle. Everything worked without exceptions or warnings. >> However, sometimes Oracle would complain that the string I was trying >> to insert into a VARCHAR2 field was too big (> 4000), even when the >> string size ( len(the_string.encode('utf-8')) ) was about 2300 bytes. >> I used a sniffer to verify that the Oracle client was sending two >> bytes for each character (even the ASCII ones), instead of sending two >> bytes only for special characters. >> >> It seemed to me that cx_Oracle accepts unicode() objects but it does >> not encode() them to the correct encoding (as set in NLS_LANG >> variable) if the WITH_UNICODE flag is unset. Instead, it just sends to >> Oracle the internal representation of the unicode() object. >> >> Is this behaviour expected? Am I doing something wrong? >> >> Regards, >> >> Guilherme. >> >> ------------------------------------------------------------------------------ >> Beautiful is writing same markup. Internet Explorer 9 supports >> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. >> Spend less time writing and rewriting code and more time creating great >> experiences on the web. Be a part of the beta today >> http://p.sf.net/sfu/msIE9-sfdev2dev >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Anthony T. <ant...@gm...> - 2010-11-18 16:11:57
|
Hi, Yes, internally unicode objects are passed through to Oracle as UTF-16 rather than encoding them in the encoding specified by NLS_LANG. You can, of course, feel free to encode yourself but I understand that can be a bit of a pain. I do have plans to see what the implications of throwing away "Unicode" mode and any attempt to use UTF-16 and simply encoding all strings as they are passed to Oracle -- but I have had no time in the past few months. I'm hopeful that things might get a little less crazy in the next few weeks.... Anthony On Wed, Nov 17, 2010 at 9:58 AM, Guilherme Menezes <gui...@gm...> wrote: > Hi, > > I am having an encoding issue using Python 2.6.2, cxOracle 5.0.4 to > access an Oracle 11g database. > > I am using the NLS_LANG=.AL32UTF8 environment variable. My table in > Oracle is correctly configured to accept Unicode. > > I compiled cxOracle without the WITH_UNICODE flag and passed unicode() > objects to cxOracle. Everything worked without exceptions or warnings. > However, sometimes Oracle would complain that the string I was trying > to insert into a VARCHAR2 field was too big (> 4000), even when the > string size ( len(the_string.encode('utf-8')) ) was about 2300 bytes. > I used a sniffer to verify that the Oracle client was sending two > bytes for each character (even the ASCII ones), instead of sending two > bytes only for special characters. > > It seemed to me that cx_Oracle accepts unicode() objects but it does > not encode() them to the correct encoding (as set in NLS_LANG > variable) if the WITH_UNICODE flag is unset. Instead, it just sends to > Oracle the internal representation of the unicode() object. > > Is this behaviour expected? Am I doing something wrong? > > Regards, > > Guilherme. > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Anthony T. <ant...@gm...> - 2010-11-18 16:09:01
|
Hi, For "examples" I can suggest looking at the code in cx_PyOracleLib and cx_OracleTools http://cx-pyoraclelib.sourceforge.net/ http://cx-oracletools.sourceforge.net/ Those ones are "real-world". In the end, however, whether you are using updates, selects, inserts, deletes it all works exactly the same way. See below. cursor.execute(""" update sometable set somecolumn1 = :somevalue1, somecolumn2 = :somevalue2 where somecolumn3 = :somevalue3""", somevalue1 = 5, somevalue2 = "Another string of some sort", somevalue3 = "The primary key or some other such") Hope that helps you out. Anthony On Thu, Nov 18, 2010 at 8:44 AM, Robert <web...@gm...> wrote: > Anurag, yes, thanks but I'm really looking for "real-world" examples, > i.e. ones that uses bind variable/parameters in WHERE clause. > The examples in cx_Oracle doc all seem to be simple type like you provided. > > > On Thu, Nov 18, 2010 at 1:27 AM, Anurag Chourasia > <anu...@gm...> wrote: >> Hi Robert, >> Are you looking at something like this? >> connection = cx_Oracle.connect(Connection_String) >> cursor = connection.cursor() >> query = "UPDATE <TABLE> SET <COLUMN>=<VALUE> WHERE <Where Clause>" >> cursor.execute(str(query)) >> connection.commit() >> Regards, >> Anurag > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Robert <web...@gm...> - 2010-11-18 15:44:55
|
Anurag, yes, thanks but I'm really looking for "real-world" examples, i.e. ones that uses bind variable/parameters in WHERE clause. The examples in cx_Oracle doc all seem to be simple type like you provided. On Thu, Nov 18, 2010 at 1:27 AM, Anurag Chourasia <anu...@gm...> wrote: > Hi Robert, > Are you looking at something like this? > connection = cx_Oracle.connect(Connection_String) > cursor = connection.cursor() > query = "UPDATE <TABLE> SET <COLUMN>=<VALUE> WHERE <Where Clause>" > cursor.execute(str(query)) > connection.commit() > Regards, > Anurag |
From: Anurag C. <anu...@gm...> - 2010-11-18 06:31:35
|
Hi Anthony, I can confirm that I was able to solve this. Following your advice I continued compiling and with gcc it finally worked. I don't care if it does not compile with xlc_r.......gcc compiles it best. Thanks for all your guidance. Regards, Anurag On Wed, Nov 17, 2010 at 7:15 AM, Anthony Tuininga < ant...@gm...> wrote: > Hi, > > >From the error and the location it is complaining about it looks like > the XLC compiler does not understand // as comment characters. That's > not something I'm prepared to "fix". There might be > a setting you can use to make the compiler understand those > characters. Or you can use gcc as you attempted to do. From your log > it looks like only warnings were issued which can often be safely > ignored. I know others have built successfully on AIX so hopefully > they will come out of the woodwork and clue you in. :-) A quick search > of the archives shows a number of people asking questions and some of > the replies might be enlightening to you. Good luck! > > Anthony > > On Tue, Nov 16, 2010 at 5:13 PM, Anurag Chourasia > <anu...@gm...> wrote: > > Dear cx-Oracle users, > > I am having problems compiling cx-Oracle version 5.0.3 on a AIX Machine. > I > > would appreciate if someone could please help me. > > I downloaded the source from http://cx-oracle.sourceforge.net/ > > When building using python setup.py build, i get the following error > > > --------------------------------------------------------------------------------------------------------------------------------------- > > wm (wmosds) [zibal] - /u01/home/apli/wm/GDD/cx_Oracle-5.0.3 :>python > > setup.py build > > running build > > running build_ext > > building 'cx_Oracle' extension > > xlc_r -ma -I/opt/freeware/include -DAIX_GENUINE_CPLUSCPLUS -Wl,-brtl > > -DNDEBUG -O -I/u01/home/app/oracle/product/10.2/rdbms/demo > > -I/u01/home/app/oracle/product/10.2/rdbms/public > > -I/opt/freeware/include/python2.6 -c cx_Oracle.c -o > > build/temp.aix-5.3-2.6-10g/cx_Oracle.o -DBUILD_VERSION=5.0.3 > > "cx_Oracle.c", line 1.1: 1506-046 (S) Syntax error. > > "cx_Oracle.c", line 2.4: 1506-166 (S) Definition of function cx_Oracle > > requires parentheses. > > "/usr/include/stdio.h", line 161.3: 1506-273 (E) Missing type in > declaration > > of FILE. > > "/usr/include/stdio.h", line 167.8: 1506-166 (S) Definition of function > FILE > > requires parentheses. > > "/usr/include/stdio.h", line 167.17: 1506-276 (S) Syntax error: possible > > missing '{'? > > "/usr/include/sys/inttypes.h", line 59.9: 1506-045 (S) Undeclared > identifier > > intmax_t. > > . > > . > > . > > > --------------------------------------------------------------------------------------------------------------------------------------- > > > > I have tried using gcc and cc and g++ as the compiler instead but all of > > them give error. Here is the error > > > --------------------------------------------------------------------------------------------------------------------------------------- > > wm (wmosds) [zibal] - /u01/home/apli/wm/GDD/cx_Oracle-5.0.3 :>export > CC=g++ > > wm (wmosds) [zibal] - /u01/home/apli/wm/GDD/cx_Oracle-5.0.3 :>python > > setup.py build > > running build > > running build_ext > > building 'cx_Oracle' extension > > creating build > > creating build/temp.aix-5.3-2.6-10g > > g++ -DNDEBUG -O -I/u01/home/app/oracle/product/10.2/rdbms/demo > > -I/u01/home/app/oracle/product/10.2/rdbms/public > > -I/opt/freeware/include/python2.6 -c cx_Oracle.c -o > > build/temp.aix-5.3-2.6-10g/cx_Oracle.o -DBUILD_VERSION=5.0.3 > > In file included from Environment.c:59, > > from cx_Oracle.c:166: > > Error.c:34: warning: deprecated conversion from string constant to > 'char*' > > Error.c:34: warning: deprecated conversion from string constant to > 'char*' > > Error.c:34: warning: deprecated conversion from string constant to > 'char*' > > Error.c:34: warning: deprecated conversion from string constant to > 'char*' > > In file included from cx_Oracle.c:167: > > SessionPool.c:73: warning: deprecated conversion from string constant to > > 'char*' > > . > > . > > . > > > --------------------------------------------------------------------------------------------------------------------------------------- > > > > Here are the machine details. > > root [zibal]% uname -a > > AIX zibal 3 5 000A71F2D700 > > root [zibal]% instfix -i |grep ML > > All filesets for 5.3.0.0_AIX_ML were found. > > All filesets for 5300-01_AIX_ML were found. > > All filesets for 5300-02_AIX_ML were found. > > All filesets for 5300-03_AIX_ML were found. > > All filesets for 5300-04_AIX_ML were found. > > All filesets for 5300-05_AIX_ML were found. > > root [zibal]% oslevel -s > > 5300-05-00 > > Appreciate your help in guiding me through to a solution. > > Regards, > > Anurag > > > ------------------------------------------------------------------------------ > > Beautiful is writing same markup. Internet Explorer 9 supports > > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > > Spend less time writing and rewriting code and more time creating great > > experiences on the web. Be a part of the beta today > > http://p.sf.net/sfu/msIE9-sfdev2dev > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Anurag C. <anu...@gm...> - 2010-11-18 06:28:21
|
Hi Robert, Are you looking at something like this? connection = cx_Oracle.connect(Connection_String) cursor = connection.cursor() query = "UPDATE <TABLE> SET <COLUMN>=<VALUE> WHERE <Where Clause>" cursor.execute(str(query)) connection.commit() Regards, Anurag On Thu, Nov 18, 2010 at 11:44 AM, Robert <web...@gm...> wrote: > I searched "cx_Oracle-doc" folder for UPDATE examples but can not find > any. (even Google can't seem to find any, sigh) > > please provide an UPDATE example (with parameters) > > > thanks > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Robert <web...@gm...> - 2010-11-18 06:14:34
|
I searched "cx_Oracle-doc" folder for UPDATE examples but can not find any. (even Google can't seem to find any, sigh) please provide an UPDATE example (with parameters) thanks |