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

x
?
Solved

Locate field with null value

Posted on 2002-04-28
7
Medium Priority
?
2,269 Views
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

rajni



0
Comment
Question by:rajniyadav
[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 9

Expert Comment

by:ITugay
ID: 6976398
Hi rajniyadav,

select * from sometable
where some_field is NULL
0
 

Author Comment

by:rajniyadav
ID: 6976820
i want to user
Query.Locate function
Through sql it is working but i want to user locate function.
0
 
LVL 9

Expert Comment

by:ITugay
ID: 6976843
something like this?

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

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

 

Author Comment

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

Accepted Solution

by:
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 ;-)


0
 

Author Comment

by:rajniyadav
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.
0
 
LVL 27

Expert Comment

by:kretzschmar
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 ;-)
0

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