rajniyadav
asked on
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
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
ASKER
i want to user
Query.Locate function
Through sql it is working but i want to user locate function.
Query.Locate function
Through sql it is working but i want to user locate function.
something like this?
Query1.Locate('STR', NULL, []);
STR - name of field where can be NULL
Query1.Locate('STR', NULL, []);
STR - name of field where can be NULL
ASKER
when i am doing this locate function returns false even though there is one record with null.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
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.
even not tested, but try
Query1.Locate('FIELD1;FIEL D2;FIELD3; FIELD4', VarArrayOf([varNull,varNul l,varNull, varNull]), []); //or varEmpty
seems i got no notification at april
thanks for the points
meikl ;-)
Query1.Locate('FIELD1;FIEL
seems i got no notification at april
thanks for the points
meikl ;-)
select * from sometable
where some_field is NULL