|
-
Jul 6th, 2000, 12:19 PM
#1
Thread Starter
Addicted Member
I am using ADO and I am trying to find a Null value in my database. This works fine for searching for a field with a value
username = "ME"
Criteria = "Mnemonic = '" & UCase(username) & "'"
rs.Find Criteria, , adSearchForward, 1
But, soon as I search for a null value it can't find it. Help someone please!!!
Thanx!!!
-
Jul 6th, 2000, 12:22 PM
#2
Try this out:
Code:
username = "ME"
Criteria = "Mnemonic is null"
rs.Find Criteria, , adSearchForward, 1
Hope this helps
-
Jul 6th, 2000, 12:30 PM
#3
Thread Starter
Addicted Member
Nope! Run- Time Error! 3001
-
Jul 6th, 2000, 12:31 PM
#4
What type of DB are you using???
-
Jul 6th, 2000, 12:34 PM
#5
Thread Starter
Addicted Member
Access 97, with all the proper components.
Everything else works fine except the finding a null field in the table.
Thanx
-
Jul 6th, 2000, 12:38 PM
#6
I am not sure why it is not working, you could try a new recordset using:
Code:
SQL = "SELECT * FROM table where field1 is null"
rs.Open SQL,DB,adOpenForwardOnly, adLockReadOnly
if rs.eof = false then
'NULL VALUES
end if
Hope this helps
-
Jul 6th, 2000, 12:45 PM
#7
Thread Starter
Addicted Member
I get the same error when using your code!
Run-time error 3001!
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
Maybe the problem lies somewhere else if your code didn't work?. Thanx for your time on this!
-
Jul 6th, 2000, 12:48 PM
#8
Thread Starter
Addicted Member
I got it! Thanx for your help!!!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|