Solved

Using Adotable locate

Posted on 2004-08-29
7
2,657 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi TcxGrid group footer summary 3 211
How to call a form that is in a DLL  from an application? 13 65
LAN or WAN ? 11 82
Convert MS Word document to a PDF file 9 64
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

867 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

12 Experts available now in Live!

Get 1:1 Help Now