| |

VerySource

 Forgot password?
 Register
Search
View: 762|Reply: 2

Questions about indexing

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-19 15:00:01
| Show all posts |Read mode
I want to use setkey, gotokey to find a certain field that meets the conditions. But the premise is to establish the index of this field

        Table1.close;
        Table1.Exclusive: = true;
        Table1.AddIndex ('ghindex', 'gh', [ixCaseInsensitive]);
        Table1.IndexName: = 'ghindex';
        table1.Exclusive: = false;
        table1.open;
        table1.SetKey;
        Table1.FieldByName ('gh'). Asstring: = edit1.text;
When running, I am always prompted that table is busy. I have tried many times, but it still does n’t work, please master
Reply

Use magic Report

0

Threads

13

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-7-18 17:30:01
| Show all posts
table1.open;//This sentence is an operation that does not return a set
Change execsql to see

Why not directly use SQL sentences to create an index, I have never touched the AddIndex of query,
You might as well find an example of this function and compare it.
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-18 23:00:01
| Show all posts
You can build the index of the corresponding field in the database desktop in advance, and apply
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list