adodb .FIND question
i am using excel to connect to a mysql database
i am doing this:
rs.Find "rowid='105'"
If Not rs.EOF Then cn.Execute "delete from batchinfo where rowid='105'"
and it works well
however, i need to be able to match data on multiple columns for example like this:
rs. find "rowid='105'" and "something='sometext'" and "somethingelse='moretext'"
i need to know whether or not rs.find matched ALL of the data.
how can i do this?
according to this i can't: https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-1045830.html#
however perhaps there's a way i can rs.execute "some select statement" can someone help with this?
would this do the tr开发者_运维问答ick for me and then i would check EOF:
rs.Filter "LastName='Adams' and FirstName='Lamont'"
Can you just do it all in SQL like :
DELETE FROM batchinfo where rowid='105'
AND EXISTS (SELECT * FROM batchinfo WHERE rowid='105' and something='sometext' and somethingelse='moretext')
精彩评论