Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Oct 08, 2008 07:51 PM by Jim9674
Oct 08, 2008 06:57 PM|LINK
As you can see, I originally did this using accessdatasource, and it worked great. My Client decided to change to SQL as I advised. But I can't figure out how to do this same function with an SQLdatasource. When I change it, I get an error stating "OnSelecting
(just below the CancelSelectOnNullParameter="False" is not part of the SQL something something". Please help.
FROM tblBusinessRequirements WHERE
(@RequirementID IS NULL OR RequirementID LIKE '%' + @RequirementID + '%') AND
Oct 08, 2008 07:08 PM|LINK
Try to remove the OnSelecting Event in your markup or add the event in your code.
Oct 08, 2008 07:11 PM|LINK
Thank you. Though, I do not know how to do this in the codebehind, and when I removed the OnSelecting, the code didn't produce any results in my GridView.
Oct 08, 2008 07:14 PM|LINK
What are you doing in your OnSelecting event?
Oct 08, 2008 07:15 PM|LINK
You are talking about SQLDataSource, but you are showing us an AccessDataSource sample.
Oct 08, 2008 07:16 PM|LINK
It's for my Search button. When it's clicked, it runs the datasource
Oct 08, 2008 07:18 PM|LINK
Oct 08, 2008 07:27 PM|LINK
Do you have a SQL Database in place which holds the table? If you do, you need to create a connection to point to the database.
FROM tblBusinessRequirements WHERE (@RequirementID IS NULL OR RequirementID LIKE '%' + @RequirementID + '%') AND (@RequirementVersion IS NULL OR RequirementVersion LIKE '%' + @RequirementVersion + '%');"
Oct 08, 2008 07:51 PM|LINK
Thank you very much. That worked.