Hi Lukas,
   Here is a piece of code where me trying to update a field value (as 
shown below) but me is getting error."Parameter #8 has not been set."
How to check the Parameter number here.
I think i set all fields but still why am I getting this error ?
What is the right way to set the Parameters? especially here.

*Code snippet :*

int count = ctx.update(cn).set(cn.field("already_exists"), 1)
  .where(  cn.field("ID").in(ctx.select(cn.field("ID")).from(cn)
  .join(hp)
  .on( hp.PLANE_ID.eq(cn.field("PLANE_ID")) )
  .join(cd)
  .on( ( cn.field("HC1_LEAF_ID").eq(cd.HC1_LEAF_ID).and( 
(cd.HC3_LEAF_ID).nullif(0).eq(cn.field("HC3_ITEM_ID")) ) ))
  .where( (hp.NAME.eq("BASE")).and(cd.PLANE_TYPE.eq("DETAIL")) 
))).execute();

*Error :*

Exception in thread "main" org.jooq.exception.DataAccessException: SQL 
[update (select [cd].[HC1_LEAF_ID], [cd].[HC2_LEAF_ID], [cd].[HC3_LEAF_ID], 
[cd].[PLANE_ID], ? [already_exists], row_number() over (order by 
[cd].[HC1_LEAF_ID] asc) [ID] from [dbo].[CATALOG_DETAIL] [cd] where 
[cd].[IS_PHANTOM] = ?) [cn] set [cn].[already_exists] = ? where [cn].[ID] 
in (select [cn].[ID] from (select [cd].[HC1_LEAF_ID], [cd].[HC2_LEAF_ID], 
[cd].[HC3_LEAF_ID], [cd].[PLANE_ID], ? [already_exists], row_number() over 
(order by [cd].[HC1_LEAF_ID] asc) [ID] from [dbo].[CATALOG_DETAIL] [cd] 
where [cd].[IS_PHANTOM] = ?) [cn] join [dbo].[HIERARCHY_PLANE] [hp] on 
[hp].[PLANE_ID] = [cn].[PLANE_ID] join [dbo].[CATALOG_DETAIL] [cd] on 
([cn].[HC1_LEAF_ID] = [cd].[HC1_LEAF_ID] and nullif([cd].[HC3_LEAF_ID], ?) 
= ?) where ([hp].[NAME] = ? and [cd].[PLANE_TYPE] = ?))]; Parameter #8 has 
not been set.
at org.jooq.impl.Utils.translate(Utils.java:1211)
at 
org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:495)
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:313)
at 
org.jooq.impl.AbstractDelegatingQuery.execute(AbstractDelegatingQuery.java:140)
at 
org.jooq.samples.SampleTemp_phantom_add_detail_Old.main(SampleTemp_phantom_add_detail_Old.java:383)
Caused by: java.sql.SQLException: Parameter #8 has not been set.


Thank you.'
~Shyam

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to