SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Change the search string?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bscivolette
Starting Member

USA
9 Posts

Posted - 10/02/2012 :  19:57:07  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

United Kingdom
2079 Posts

Posted - 10/03/2012 :  01:37:08  Show Profile  Visit jackv's Homepage  Reply with Quote
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
Flowing Fount of Yak Knowledge

5155 Posts

Posted - 10/03/2012 :  07:36:21  Show Profile  Reply with Quote
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

USA
9 Posts

Posted - 10/03/2012 :  10:22:15  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000