Re: [cx-oracle-users] setinputsizes problem?
Brought to you by:
atuining
From: Jason B. <jb...@gm...> - 2010-07-04 20:15:10
|
now I get the following: ORA-01036: illegal variable name/number I tried defining the input by both position (:1) and by named argument (:value1) By position, My SQL expression reads : INSERT INTO . . . values (:1, null . . .) And my execution is (cursor.execute(sql, *clobs)) Where clobs is an array of one long string: 'asdfasdfasdfasd . . ' By name, My SQL expression reads : INSERT INTO . . . values (:value1, null . . .) And my execution is (cursor.execute(sql, *clobs)) Where clobs is an array of one long string: value1='asdfasdfasdfasd . . ' Both of these give the same error On Sat, Jul 3, 2010 at 6:11 PM, Jason Boorn <jb...@gm...> wrote: > Thanks again - sorry for the confusion with the * operator - I hadn't used > it before. > > > On Sat, Jul 3, 2010 at 5:11 PM, Amaury Forgeot d'Arc <ama...@gm...>wrote: > >> 2010/7/3 Jason Boorn <jb...@gm...>: >> > Thank you, but I'm using python - could you tell me what kind of a >> structure >> > the argument should be? And how to populate it? >> > >> > My original function call was called with an array argument, an array >> > containing all of the fields being inserted. >> >> In the docs: >> http://cx-oracle.sourceforge.net/html/cursor.html#Cursor.setinputsizes >> you should not call setinputsizes() with one argument, but with one >> argument per variable. >> since you already have a list containing the various sizes, >> cursor.setinputsizes(*inputsizes) >> (note the * symbol) will "explode" the list and pass each list items >> as separate arguments to the function. >> >> -- >> Amaury Forgeot d'Arc >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > |