MSODSC Component

  • Thread starter Thread starter George Hester
  • Start date Start date
G

George Hester

I have set up a little database of 1000 or so records. It is just a library
that shows me the book cover each time I click through the records. This
will not be the final version of what I am doing but I would like to try it
this way. I am using Access 2000.

I have set up a Find which looks through one of the fields in the database.
Trouble is the only way to find anything is if I enter what is exactly in
that field in the recordsets. That is not what I want. I want to type
something in that is close to what I want and have the find return ALL
records which satisfy the criteria for that field. For example:

Say I want to look for Charles Dickens in the Author field but I do not want
to type in all that is in that Field for him. Sometimes Charles Dickens is
also known as Boz and so for Sketches by Boz this may be in the Author
field; Charles Dickens (Boz). Therefore the way it is now a search on
Charles Dickens will miss that. What I would prefer to do is search on
Dicken. Just Dicken. But that will return nothing. Can I do what I would
like to do in Access 2000 with MSODSC and if so any suggestions on doing it
or locations in which I can get an idea of what needs to be done? Thanks.
 
On Thu, 27 Dec 2007 21:44:50 -0500, "George Hester"

You can search by part of a string if you use the LIKE predicate, and
the wildcard character(s):
select * from SomeTable
where Author LIKE '*Dicken*'

-Tom.
 
MSODSC is used in Data Access Pages, which rely on ADO recordsets.
Therefore, you must use the % wildcard instead of the * wildcard.

SELECT *
FROM SomeTable
WHERE Author Like '%Dicken%';
 
Hi Ken. This query works in Access 2000 but not in the DAP wizard. I was
reading here:

http://www.aspfree.com/showblog/22422/Data-Access-Page-Based-on-a-Parametric
-Query/

that somebody thinks LIKE does not work in a DAP. I am starting to get the
same idea. I made a simple query from Microsoft:

http://support.microsoft.com/kb/304353

Of course they do not mention a DAP for this. And I believe that omission is
on purpose. It looks like it uses a special navigation wizard to pop up the
query question. I will be scrutinizing the code in that and see if somehow I
can jimmy the SQL in the DAP I have already made. Thanks for the pointer.
 
I have used % as the wildcard in DAP queries all the time, without having
any problems. However, my development work has been in ACCESS 2002 and 2003,
not 2000, so I'm not surprised that there are a few "weird things" with 2000
(it was an "interesting" release of ACCESS, to say the least).

Glad you have a working query now.
--

Ken Snell
<MS ACCESS MVP>


George Hester said:
Interesting I found the fix for this Like issue. You had it with the % Ken
just a little cleanup.

http://support.microsoft.com/kb/302411

So we have

SELECT *
FROM SomeTable
WHERE (((SomeTable.SomeField) Like "%" & [Author Name that contains the
phrase] & "%"));

--

George Hester
_________________________________
Ken Snell (MVP) said:
MSODSC is used in Data Access Pages, which rely on ADO recordsets.
Therefore, you must use the % wildcard instead of the * wildcard.

SELECT *
FROM SomeTable
WHERE Author Like '%Dicken%';
--

Ken Snell
<MS ACCESS MVP>


Thanks.
 
Yes it was the last release with SP1 before SECURITY became such a hot
topic. For better or worse we must decide.

--

George Hester
_________________________________
Ken Snell (MVP) said:
I have used % as the wildcard in DAP queries all the time, without having
any problems. However, my development work has been in ACCESS 2002 and 2003,
not 2000, so I'm not surprised that there are a few "weird things" with 2000
(it was an "interesting" release of ACCESS, to say the least).

Glad you have a working query now.
--

Ken Snell
<MS ACCESS MVP>


George Hester said:
Interesting I found the fix for this Like issue. You had it with the % Ken
just a little cleanup.

http://support.microsoft.com/kb/302411

So we have

SELECT *
FROM SomeTable
WHERE (((SomeTable.SomeField) Like "%" & [Author Name that contains the
phrase] & "%"));

--

George Hester
_________________________________
Ken Snell (MVP) said:
MSODSC is used in Data Access Pages, which rely on ADO recordsets.
Therefore, you must use the % wildcard instead of the * wildcard.

SELECT *
FROM SomeTable
WHERE Author Like '%Dicken%';
--

Ken Snell
<MS ACCESS MVP>


On Thu, 27 Dec 2007 21:44:50 -0500, "George Hester"

You can search by part of a string if you use the LIKE predicate, and
the wildcard character(s):
select * from SomeTable
where Author LIKE '*Dicken*'

-Tom.


I have set up a little database of 1000 or so records. It is just a
library
that shows me the book cover each time I click through the records.
This
will not be the final version of what I am doing but I would like to
try
it
this way. I am using Access 2000.

I have set up a Find which looks through one of the fields in the
database.
Trouble is the only way to find anything is if I enter what is
exactly
in
that field in the recordsets. That is not what I want. I want to type
something in that is close to what I want and have the find return ALL
records which satisfy the criteria for that field. For example:

Say I want to look for Charles Dickens in the Author field but I do not
want
to type in all that is in that Field for him. Sometimes Charles
Dickens
is
also known as Boz and so for Sketches by Boz this may be in the Author
field; Charles Dickens (Boz). Therefore the way it is now a search on
Charles Dickens will miss that. What I would prefer to do is search on
Dicken. Just Dicken. But that will return nothing. Can I do what I
would
like to do in Access 2000 with MSODSC and if so any suggestions on
doing
it
or locations in which I can get an idea of what needs to be done? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top