What are the results you do get? Is there an error or just no results
returned. Does it search department correctly and not last name correctly?
The first thing I would do is write your query as a stored procedure. Get
that working and then just send the stored proc. the parameters. It's much
more efficient and easier to debug. The first thing I'd question is that you
may not be able to use the percent sign right after the parameter in your
query. But I'm not certain about that. The second thing (this one for sure)
is that when you use the percent sign you shouldn't use the equals sign you
should use "LIKE".
OR ([Last_Name] LIKE @Last_Name%))">
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
<vn****@hotmail.com> wrote in message
news:11********************@u72g2000cwu.googlegrou ps.com...
the problem i'm having is that i can't get the Sql statement set to
search for Department or Last_Name%..
:(
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:dbPMAEventsConnectionString %>"
SelectCommand="SELECT [Last_Name], [First_Name], [Title],
[Extension], [Email_Address], [Department] FROM [qryEntire_List] WHERE
(([Department_ID] = @Department_ID) OR ([Last_Name] = @Last_Name%))">
<SelectParameters>
<asp:ControlParameter ControlID="lastnameTextbox"
Name="Last_Name" PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>