Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Change the search string?

Author  Topic 

bscivolette
Starting Member

9 Posts

Posted - 2012-10-02 : 19:57:07
Good Evening,

I am attempting to learn ASP and SQL by fixing simple bugs in my existing software. I am trying to fix a customer search that returns three columns: customer name, move date and job status. I've found that the move date column displays incorrect data from a different view, whereas the other two columns are populating data from the correct view. Simple, right?

Well, I began by looking at the customer search control and found that it's using a data set called 'SearchCustomerDS'. It also references a BLL file (see code below) so I tried there.


<asp:ObjectDataSource ID="odsCustomers" runat="server"
SelectMethod="SearchCustomerDS"
TypeName="EML.EML.CustomerBLL">
<SelectParameters>
<asp:ControlParameter ControlID="txtSearchString"
Name="SearchString" PropertyName="Text" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>


I located the code in the BLL (see below) that references the search, but have not been able to locate the data it is calling.


Public Function SearchCustomerDS(SearchString As String) As DataSet
Return CustomerProvider.SearchCustomerDS(SearchString)
End Function


I feel as though I have looked everywhere and have been unsuccessful. Perhaps I am not understanding how data sets work, but as I mentioned, I am very new to this. I'd appreciate any input!

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2012-10-03 : 01:37:08
As a starting point , are you sure the correct data is returning from SQL Server?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-10-03 : 07:36:21
Use Visual Studio to search for the object definitions and code-behind file. Place your cursor on CustomerProvider in the statement "Return CustomerProvider.SearchCustomerDS(SearchString)" and press F12 (or right-click and select Go to definition (I think)). Look in that class to see the definition of SearchCustomerDS method and so on until you find the query that is filling the dataset.
Go to Top of Page

bscivolette
Starting Member

9 Posts

Posted - 2012-10-03 : 10:22:15
Awesome, thank you! By the way, I realized after the fact that this was more of an ASP.Net question and less of a SQL question, I was toast after a very long day yesterday.
Go to Top of Page
   

- Advertisement -