Home > database >  Excuse me, where is this passage to write wrong?
Excuse me, where is this passage to write wrong?

Time:10-04

Ls_sql="if the exists (select * from kcckye where kcckye_kjnd=" + ls_kjnd + "and" kcckye_kjqj="+ ls_kjqj +" and "kcckye_ckbh=" + ls_ckbh + "" + & amp;
"And kcckye_wlbh=" + ls_wlbh + "), the update kcckye set kcckye_jslj=kcckye_jslj + li_sl, kcckye_jfsl=kcckye_jfsl + li_sl "+ & amp;
"Where (kcckye_kjnd=: ls_kjnd and kcckye_kjqj=: ls_kjqj and kcckye_ckbh=: ls_ckbh and kcckye_wlbh=: ls_wlbh)" + & amp;
"The else insert into kcckye (kcckye_kjnd kcckye_kjqj, kcckye_ckbh, kcckye_wlbh, kcckye_jslj, kcckye_jfsl) values (" + ls_kjnd +", "+ ls_kjqj +", "+ ls_ckbh +", "+ ls_wlbh +", "+ li_sl + ', '+ li_sl +)"

CodePudding user response:

What mistake? Seems to be "" should be" "?

CodePudding user response:

It's too messy

CodePudding user response:

Just look at line 1, behind no
The first line of error:
Ls_sql="if the exists (select * from kcckye where kcckye_kjnd=" + ls_kjnd + "and...

It should be:
Ls_sql="if the exists (select * from kcckye where kcckye_kjnd='" + ls_kjnd +"' and...

CodePudding user response:

Too messy, bad analysis, to messagebox results into the database, is very good to verify wrong,

CodePudding user response:

Format is not good,

Interrupt code, SQL debugging out, directly to the database performed a try,

CodePudding user response:

Wrong a lot of ah, you finally get ls_sql results out, slowly changed

CodePudding user response:

Ls_sql="if the exists (select * from kcckye where kcckye_kjnd='" + ls_kjnd +"' and kcckye_kjqj='" + ls_kjqj + "' and kcckye_ckbh='" + ls_ckbh + "' "+ & amp;
='" + "and kcckye_wlbh ls_wlbh +"') update kcckye set kcckye_jslj=kcckye_jslj + "+ string (li_sl) +", kcckye_jfsl=kcckye_jfsl + "+ string (li_sl) +" "+ & amp;
='" + "where (kcckye_kjnd ls_kjnd +"' and kcckye_kjqj='" + ls_kjqj + "' and kcckye_ckbh='" + ls_ckbh + "' and kcckye_wlbh='" + ls_wlbh + "') "+ & amp;
"The else insert into kcckye (kcckye_kjnd kcckye_kjqj, kcckye_ckbh, kcckye_wlbh, kcckye_jslj, kcckye_jfsl) values ('" + ls_kjnd + "', '" + ls_kjqj +"', '" + ls_ckbh + "', '" + ls_wlbh + ", "+ string (li_sl) +", "+ string (li_sl) +") "

Error has been modified oneself see for you!

CodePudding user response:

Taking out ls_sql values (such as on the text controls), and then run into the database analysis.

CodePudding user response:

Spell into the character in the SQL type variable, remember to add single quotes

Ls_kjnd kcckye_kjnd="+ +" and
Kcckye_kjnd='" + ls_kjnd + "' the and

CodePudding user response:

="+ ls_kjnd +" should be='" + ls_kjnd + "' and so on

CodePudding user response:

Pay attention to pick up points

CodePudding user response:

A little difficulty oh
  • Related