Home > Back-end >  Oracle is in executing SQL statements. A variable with the same how binding
Oracle is in executing SQL statements. A variable with the same how binding

Time:03-27

 SELECT * 
The FROM (SELECT T_GDS OWNER_NO,
T_GDS GOODS_NO,
T_GDS GOODS_NAME,
T_GDS GOODS_LENGTH,
T_GDS GOODS_WIDTH,
T_GDS GOODS_HEIGHT,
T_GDS MARKETINGAUTHORISATIONHOLDER,
(SELECT MIN (T_STK DISPLAY_LOCATION)
The FROM VIW_FD_STOCK T_STK
WHERE T_STK. GOODS_ID=T_GDS. GOODS_ID) DISPLAY_LOCATION
The FROM FD_GOODS T_GDS
LEFT the JOIN REC_GOODS_RST T_RST
ON T_GDS. GOODS_ID=T_RST. GOODS_ID
WHERE T_GDS. IS_AVAILABLE='Y'
AND T_RST. LWH_MOD_FLG IS NULL
AND T_GDS. IS_GIFT='N'
AND (T_GDS GOODS_LENGTH & lt;=1 OR T_GDS. GOODS_WIDTH & lt;=1 OR
T_GDS. GOODS_HEIGHT & lt;
=1)AND the EXISTS
(SELECT 1 FROM FD_STOCK T WHERE T.G OODS_ID=T_GDS. GOODS_ID))
The WHERE (: GOODS_NO IS NULL OR GOODS_NO LIKE '%' | | : GOODS_NO | | '%')
AND (" GOODS_NAME IS NULL OR GOODS_NAME LIKE '%' | | : GOODS_NAME | | '%')
AND (: DISPLAY_LOCATION IS NULL OR DISPLAY_LOCATION LIKE '%' | | : DISPLAY_LOCATION | | '%')
The ORDER BY DISPLAY_LOCATION, GOODS_NO


I did this, choose generate perpareCall to like
Call=conn. PrepareCall (SQL);

And then change the name binding
Call. SetObject (" GOODS_NO, "obj. Get (" Value"), obj. GetInteger (" Type "))
Call. SetObject (" GOODS_NAME ", obj. Get (" Value "), obj. GetInteger (" Type "))
Call. SetObject (" DISPLAY_LOCATION, "obj. Get (" Value"), obj. GetInteger (" Type "))

But the program error
Java. SQL. SQLException: index lost IN or OUT parameters: : 4

Then I have six variables but with the same name, actually only three, I am bound for three, but still an error, but in the.net variable bindings can be the same name in the normal execution of

Even if I put the variable binding with the same two times also not line, at the same mistake
  • Related