teblack
Programmer
- Apr 30, 2004
- 45
I have an ASP page that I'm attempting to retrieve data from a SQL 2000 DB and display that data on a page. I have built the ado commands, but I'm having problems getting the SQL statement to work when using the wildcard '%'. The code is listed below.
The result that I'm looking for would be the following -
Select * from v_EPAYAdminCompanySearch where name like 'G%'
If you have any ideas, or direction to send me, please let me know.
Thanks in advance for all help with this.
Thanks
TBlack -
Code:
adoCmd.CommandText = "select * from v_EPAYAdminCompanySearch"
if not Request("empletter") = vbNullString then
adoCmd.CommandText = adoCmd.CommandText & _
" where name like '?"
adoCmd.Parameters.Append adoCmd.CreateParameter("name", adChar, adParamInput, 5, Request("empletter"))
adoCmd.CommandText = adoCmd.CommandText & "%'"
end if
The result that I'm looking for would be the following -
Select * from v_EPAYAdminCompanySearch where name like 'G%'
If you have any ideas, or direction to send me, please let me know.
Thanks in advance for all help with this.
Thanks
TBlack -