GrdiView with two stored procedures

Discussion in '.NET' started by TheStoof, Jul 6, 2009.

  1. TheStoof

    TheStoof

    Joined:
    Jul 6, 2009
    Messages:
    1
    Basically, what I'm doing is a binary search in a database that'll return the values needed.

    Code:
    @FoldChange_1 float,
    @FoldChange_2 float,
    @ExpAnalysisName_1 nvarchar(max),
    @ExpAnalysisName_2 nvarchar(max),
    @TimePt_1 float,
    @TimePt_2 float,
    @pVal_1 float,
    @pVal_2 float
    
    AS
    
    IF (@FoldChange_1 >= 0 AND @FoldChange_2 >= 0)
    (
    SELECT ExpAnalysisName, ProbeID, GenBankID, TIGR_Desc AS GeneName, pVal AS P_Value, FoldChange
    FROM VW_data
    WHERE (ExpAnalysisName = @ExpAnalysisName_1 AND TimePt = @TimePt_1 AND pVal <= @pVal_1 AND FoldChange >= @FoldChange_1)
    AND ProbeID IN
    (
    SELECT ProbeID
    FROM VW_data
    WHERE (ExpAnalysisName = @ExpAnalysisName_2 AND TimePt = @TimePt_2 AND pVal <= @pVal_2 AND FoldChange >= @FoldChange_2) 
    )
    )
    ....there's more, but it's a repeat
    
    So using the code, it returns the table, but ONLY for ExpAnalysisName_1, pVal_1, and FoldChange_1. I need, also, for my GridView to display rows that are also in ExpAnalysisName_2...FoldChange_2.

    And thus...

    Code:
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="GridView" CellPadding="4" 
                GridLines="Horizontal" AllowSorting="True" AllowPaging="True">
            <RowStyle BackColor="#EFF3FB" />
            <Columns>
                <asp:BoundField DataField="ExpAnalysisName" HeaderText="ExpAnalysisName" 
                    SortExpression="ExpAnalysisName" />
                <asp:BoundField DataField="ProbeID" HeaderText="ProbeID" 
                    SortExpression="ProbeID" />
                <asp:BoundField DataField="GenBankID" HeaderText="GenBankID" 
                    SortExpression="GenBankID" />
                <asp:BoundField DataField="GeneName" HeaderText="GeneName" 
                    SortExpression="GeneName" />
                <asp:BoundField DataField="P_Value" HeaderText="P_Value" 
                    SortExpression="P_Value" />
                <asp:BoundField DataField="FoldChange" HeaderText="FoldChange" 
                    SortExpression="FoldChange" />
            </Columns>
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#FFFFFF" Font-Bold="True" CssClass="GridHeader"/>
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
            <asp:SqlDataSource ID="GridView" runat="server" 
                ConnectionString="<%$ ConnectionStrings:SGMD3_DataBase %>" 
                SelectCommand="Search_Binary" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:FormParameter FormField="FoldChange_1" Name="FoldChange_1" Type="Double" />
                    <asp:FormParameter FormField="FoldChange_2" Name="FoldChange_2" Type="Double" />
                    <asp:FormParameter FormField="pVal_1" Name="pVal_1" Type="Double" />
                    <asp:FormParameter FormField="pVal_2" Name="pVal_2" Type="Double" />
                    <asp:FormParameter FormField="TimePt_1" Name="TimePt_1" Type="Double" />
                    <asp:FormParameter FormField="TimePt_2" Name="TimePt_2" Type="Double" />
                    <asp:FormParameter FormField="ExpAnalysisName_1" Name="ExpAnalysisName_1" Type="String" />
                    <asp:FormParameter FormField="ExpAnalysisName_2" Name="ExpAnalysisName_2" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
    


    So what I need to do is RUN a stored procedure again, but this time flip the values, then merge the two tables.

    Any ideas? I know nothing about coding ASP.NET or C#.
     
    TheStoof, Jul 6, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Taras
    Replies:
    2
    Views:
    4,815
    Rick Spiewak
    Oct 5, 2003
  2. Soumitra Banerjee

    Putting stored procedures in a dll

    Soumitra Banerjee, Feb 27, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    408
    Soumitra Banerjee
    Feb 27, 2004
  3. lhak
    Replies:
    1
    Views:
    5,445
    √Čric Moreau [VB MVP]
    Oct 23, 2004
  4. pargat.singh@gmail.com

    Grdiview Sorting problem

    pargat.singh@gmail.com, Apr 25, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    371
    pargat.singh@gmail.com
    Apr 25, 2007
  5. katmagic
    Replies:
    0
    Views:
    374
    katmagic
    Feb 19, 2008
Loading...

Share This Page