Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2450
  • Last Modified:

Locate field with null value

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
rajniyadav
Asked:
rajniyadav
  • 3
  • 2
  • 2
1 Solution
 
ITugayCommented:
Hi rajniyadav,

select * from sometable
where some_field is NULL
0
 
rajniyadavAuthor Commented:
i want to user
Query.Locate function
Through sql it is working but i want to user locate function.
0
 
ITugayCommented:
something like this?

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

STR - name of field where can be NULL
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
rajniyadavAuthor Commented:
when i am doing this locate function returns false even though there is one record with null.
0
 
kretzschmarCommented:
? 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
 
rajniyadavAuthor Commented:
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
 
kretzschmarCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now