Click to See Complete Forum and Search --> : Searching a Memo Field


John G Duffy
July 19th, 2001, 09:24 AM
I have this small dataBase that contains a Memo Field.
I need to be able to search this memo field for particular words.
Being a DataBase ignorant soul. I am at a loss.
Can anyone help?
Here is an example of a SQL statement the program currently uses

set mRS = mDB.OpenRecordset("select * from codeitems where id = " & msKey)
'
'
I need it something like
set mRS = mDB.OpenRecordset("select * from codeitems where example contains the word "Bookmark").



My DataBAse for Dummies book does not cover this situation.


John G

Cakkie
July 19th, 2001, 09:45 AM
If your database for dummies book does not cover that part, throw it away.

set mRS = mDB.OpenRecordset("select * from codeitems where example like ""*Bookmark*""")




Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook

Cimperiali
July 19th, 2001, 11:04 AM
Depending on database/provider you may have to write
"...like ''%Bookmark%'' "

Do not throw away your books. Buy some more ones!
(The BookSeller)

Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.

John G Duffy
July 19th, 2001, 02:39 PM
Actually my book does cover the "Like" verb. I was hoping for something a little more sophisticated though. My memo field data could include 30-40Kb per record so searching using "Like" may take a while.
I never throw out books. At the very least I donate them to a library.

'
Thanks guys,

John G

Cakkie
July 20th, 2001, 01:13 AM
Ok, LIKE can be slow, but I don't think there actually is a fast way of doing something like this. I don't thing processing the entire recordset will be any faster, hence you still need to write it yourself.

Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook