Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Using Adotable locate

Posted on 2004-08-29
7
Medium Priority
?
3,261 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 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

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!

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Loops Section Overview
Suggested Courses

824 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