Home > database >  Pb access like finding problems?
Pb access like finding problems?

Time:09-27

Pb even use access fuzzy search like '% aa %' why sqldbcode=3,

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 value

CodePudding user response:

From the specific SQL and have a look

CodePudding 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 100

CodePudding 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 data

CodePudding user response:

No cursor try first single SQL
Int 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 everydaywork
Where
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 'number

CodePudding user response:

To use escape characters to illustrate 'symbol, otherwise, they are automatically handled

CodePudding user response:

Do not check or not, the data

CodePudding user response:

With three ~ try, escape character is very trouble

CodePudding user response:

A two or three

CodePudding user response:

Is not a datastore, faster than using the cursor

CodePudding user response:

Is also a method, the place I want to understand

CodePudding user response:

Don't have the access on the machine, otherwise I would test, should be ok

CodePudding 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 version

CodePudding user response:

refer to 21st floor glint response:
like '% aa %'
Does not support you this wildcard,
Try:
Like '* aa *'

This is similar,

CodePudding user response:

As_text as_text='%' + + '%'
Select * from table where column1 like: as_text using the sqlca.
Should be well
  • Related