CodePudding user response:
Sqlerrtext=""CodePudding user response:
How much is sqlcode, is there any sqlerrtext? Sqldbcode is the return value of a DBMS, determine whether a mistake should check sqlcode, if return to multiple records sqldbcode ~ ~ there must be a nonzero valueCodePudding user response:
From the specific SQL and have a lookCodePudding user response:
As_text="' % %" + as_text + "'"DECLARE cur_day CURSOR FOR
The select truework, id from everydaywork
Where
//plan like: as_text
Truework like: as_text
//or problem like: as_text
//or nextplan like: as_text
//or the content like: as_text
The order by startdate desc;
The OPEN cur_day;
The DO WHILE the sqlca. SQLCode=0
The FETCH cur_day Into: ls_content, : ll_id;
IF the sqlca. SQLCode & lt;> 0 THEN
The EXIT
END the IF
Dw_2. Insertrow (0)
Dw_2. Setitem (dw_2. Rowcount (), "as_id", ll_id)
Dw_2. Setitem (dw_2. Rowcount (), "as_content ls_content)
Dw_2. Setitem (dw_2. Rowcount (), "as_key," 'DAY')
LOOP
The CLOSE cur_day;
CodePudding user response:
In the FETCH cur_day sqldbcode=3, after the sqlerrtext='CodePudding user response:
I can query to the data in pb, is, it's back to 100CodePudding user response:
Sqldbcode represents the value of the DBMS, you why want to judge it, cursor for judging sqlcode is ok, you check about dbcode 3 specific access help, generally do not need to pay attention to it ~ ~CodePudding user response:
Key now I sqlcode judgment by ah, why I couldn't check data, sqlcode=100, and I put the query directly copied to pb database that place, can check the dataCodePudding user response:
No cursor try first single SQLInt li_count
As_text="' % %" + as_text + "'"
Select COUNT (*) into: li_count from everydaywork
Where truework like: as_text
The order by startdate desc;
The value of assess the li_count see ~ ~
CodePudding user response:
The select truework into: ls_content from everydayworkWhere
Truework like '%' % workers;
You can find data
As_text="' % %" + as_text + "'"
The select truework into: li_content from everydaywork
Where truework like: as_text;
So you won't be able to check
CodePudding user response:
As_text="' % %" + as_text + "'"To as_text="~ ~ '% % ~ ~" + as_text + "' "try
CodePudding user response:
Number two to add a 'numberCodePudding user response:
To use escape characters to illustrate 'symbol, otherwise, they are automatically handledCodePudding user response:
Do not check or not, the dataCodePudding user response:
With three ~ try, escape character is very troubleCodePudding user response:
A two or threeCodePudding user response:
Is not a datastore, faster than using the cursorCodePudding user response:
Is also a method, the place I want to understandCodePudding user response:
Don't have the access on the machine, otherwise I would test, should be okCodePudding user response:
IE has a problem, can't afford to point "reference"Look at the # 10 floor, among them:
As_text="' % %" + as_text + "'"
The select truework into: li_content from everydaywork
Where truework like: as_text;
So you won't be able to check
This changed to try:
As_text as_text="%" + + "%
"The select truework into: li_content from everydaywork where truework like: as_text;
CodePudding user response:
Like '% aa %'Does not support you this wildcard,
Try:
Like '* aa *'
CodePudding user response:
//Not all DBMSs are support CURSOR scrolling and locking options.//So I add the following dbParm string witness whereof
The SQLCA. DbParm="CursorScroll='Dynamic', CursorLock='OptVal'"
//is used to set the cursor attributes parameters: CursorUpdate CursorScroll CursorLib CursorLock
CodePudding user response:
It is better to pb9 and older versionCodePudding user response: