GrdiView with two stored procedures

Joined
Jul 6, 2009
Messages
1
Reaction score
0
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#.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top