Solved

Using Adotable locate

Posted on 2004-08-29
7
2,580 Views
Last Modified: 2010-05-18
Hey there,

Trying to use adotable locate to find a row in a database, the row must has two things it must match. The name and the number.

So I used this

If Adotable1.Locate('name;number', VarArrayOf(['bob', '123']), []) then....

but it dosn't match it, yet I do have a record of that in the database.
Anyone have a clue what I am doing wrong?
name and number are the colums. bob and 123 are the name and number to locate.

Cheers
Nick

0
Comment
Question by:wildzero
  • 3
  • 2
  • 2
7 Comments
 
LVL 4

Accepted Solution

by:
mottor earned 65 total points
ID: 11925032
May be you have 'Bob' instead of 'bob' in the table

Adotable1.Locate('name;number', VarArrayOf(['bob', '123']), [loCaseInsensitive])

Best Regards,
Mottor
0
 
LVL 10

Author Comment

by:wildzero
ID: 11925038
Mottor,

Nope same thing, still dosn't want to pick it up.
0
 
LVL 6

Assisted Solution

by:bpana
bpana earned 60 total points
ID: 11925072
Adotable1.Locate('name;number', VarArrayOf(['bob', 123]), [])
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 6

Expert Comment

by:bpana
ID: 11925089
or maybe you have filtered the recordset and the searched record it is not in available.
0
 
LVL 10

Author Comment

by:wildzero
ID: 11925118
Bpana,

Nope still nothing.
Don't have it filtered...
0
 
LVL 10

Author Comment

by:wildzero
ID: 11925137
Argh shoot!
I found the problem, it was after the statement.
It was returning true, and doing what it had to do, then right afterwards I had it un-doing it.

:(
Sorry chaps
0
 
LVL 4

Expert Comment

by:mottor
ID: 11925233
You should give the points to yourself :)

The funny thing is that by me (Oracle) loCaseInsensitive doesn't matter and loPartialKey doesn't work. And it finds not only 'Bob', but also ' bob' and 'bob '.

Best Regards,
Mottor
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now