Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Locate field with null value

Posted on 2002-04-28
Medium Priority
Last Modified: 2012-05-04
I am using interbase as database with delphi 5.
i am using TIBQuery

Now in a table one field contains Null
i want to use locate function locate this field where value is null. Its now working.

Do you have any suggestions


Question by:rajniyadav
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

Expert Comment

ID: 6976398
Hi rajniyadav,

select * from sometable
where some_field is NULL

Author Comment

ID: 6976820
i want to user
Query.Locate function
Through sql it is working but i want to user locate function.

Expert Comment

ID: 6976843
something like this?

  Query1.Locate('STR', NULL, []);

STR - name of field where can be NULL
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.


Author Comment

ID: 6976989
when i am doing this locate function returns false even though there is one record with null.
LVL 27

Accepted Solution

kretzschmar earned 300 total points
ID: 6977577
? maybe
as the values in the locate-method are internal variants you could try

Query1.Locate('STR', varNull, []); //or varEmpty

just a guess

meikl ;-)


Author Comment

ID: 6979294
kretzschmar that works but i have one more problem.

Since i have more than on fields value to locate can u tell how can i store those values in a variable and use it in locate function

i made one string variable even variant and stored all the fieldvalues seperated with commas in that but it is not locating the right record.
And if i directly give the value in hte locate function it does locates

Can u help in that.
LVL 27

Expert Comment

ID: 7213588
even not tested, but try

Query1.Locate('FIELD1;FIELD2;FIELD3;FIELD4', VarArrayOf([varNull,varNull,varNull,varNull]), []); //or varEmpty

seems i got no notification at april

thanks for the points

meikl ;-)

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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…
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 course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

636 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