MFC, ISAPI and Access with ODBC
Carlos Morales Mengotti -- cmengot@hispaworld.es
Thursday, August 29, 1996
Environment: NT 4.0, VC++ 4.0, IIS 2.0
I just finished a ISAPI aplication DLL that query in a Access database
by means of the ODBC, Microsoft Access Driver ODBCJT32.DLL, Microsoft
ODBC Desktop, Driver Pack 3.0, Version 3.40.2829. (Sorry for all that).
I am using the LIKE predicate in a CRecordset m_srtFilter and for my
surprise it doesn't recognize the asterisk '*'. In a CDaoRecordset I can
use it in the member function .Find().
I must use the ODBC do you know, out there, how to get in SQL the same
results that I get with an asterisk before or after the word that I use
for the search?
Thanks
--
--------------------------------------------------------------------------
Carlos Morales Mengotti
C++ & Electronic Publishing
cmengot@hispaworld.es
34 - 1 - 897.78.68
Apartado 23
28210 Valdemorillo (Spain)
--------------------------------------------------------------------------
Andrea Matta -- andma@mbox.vol.it
Monday, September 02, 1996
[Mini-digest: 2 responses]
Hi Carlos,
> I am using the LIKE predicate in a CRecordset m_srtFilter and for my
> surprise it doesn't recognize the asterisk '*'. In a CDaoRecordset I
> can use it in the member function .Find().
> I must use the ODBC do you know, out there, how to get in SQL the same
> results that I get with an asterisk before or after the word that I use=
> for the search?
Just use a percent '%' character in place of the asterisk.
--
Andrea Matta
am@POBoxes.com
http://www.poboxes.com/POBoxes/?am
-----From: Gerry Sweeney
Carlos,
Try a '%'(percent) sign. For example:-
"SELECT * FROM mytable WHERE name LIKE A%"
Will return all records where the name field begins with A
or
"SELECT * FROM mytable WHERE name LIKE %A%"
Will return all records where the name field contains A
Hope this helps.
Gerry Sweeney
gerry@hornbill.com
----------
From: owner-mfc-l
To: ISAPI-L; mfc-l
Subject: MFC, ISAPI and Access with ODBC
Date: 29 August 1996 21:21
Environment: NT 4.0, VC++ 4.0, IIS 2.0
I just finished a ISAPI aplication DLL that query in a Access database
by means of the ODBC, Microsoft Access Driver ODBCJT32.DLL, Microsoft
ODBC Desktop, Driver Pack 3.0, Version 3.40.2829. (Sorry for all that).
I am using the LIKE predicate in a CRecordset m_srtFilter and for my
surprise it doesn't recognize the asterisk '*'. In a CDaoRecordset I can
use it in the member function .Find().
I must use the ODBC do you know, out there, how to get in SQL the same
results that I get with an asterisk before or after the word that I use
for the search?
Thanks
--
--------------------------------------------------------------------------
Carlos Morales Mengotti
C++ & Electronic Publishing
cmengot@hispaworld.es
34 - 1 - 897.78.68
Apartado 23
28210 Valdemorillo (Spain)
--------------------------------------------------------------------------
| Вернуться в корень Архива
|