?
Solved

Using Adotable locate

Posted on 2004-08-29
7
Medium Priority
?
3,040 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 4

Accepted Solution

by:
mottor earned 195 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 180 total points
ID: 11925072
Adotable1.Locate('name;number', VarArrayOf(['bob', 123]), [])
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month13 days, left to enroll

777 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