Solved

Using Adotable locate

Posted on 2004-08-29
7
2,934 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 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
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

695 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