Detailsview and stored Proc

Discussion in 'ASP .Net Web Controls' started by TdarTdar, Nov 16, 2005.

  1. TdarTdar

    TdarTdar Guest

    Using the following example:

    <asp:DetailsView ID="DetailsView1" runat="server"
    DataSourceID="SqlDataSource1" Height="1px"
    Width="100%">
    <RowStyle Wrap="False" />
    </asp:DetailsView>

    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
    ConnectionString="<%$ ConnectionStrings:Main_SystemConnectionString1 %>"
    SelectCommand="GETOLDSHIPRECORD" SelectCommandType="StoredProcedure">
    <SelectParameters>
    <asp:QueryStringParameter Name="TNUMBER"
    QueryStringField="tnumber" Type="String" Size="6" />
    </SelectParameters>
    </asp:SqlDataSource>


    The Stored Procedure example is:

    Create Procedure [GETOLDSHIPRECORD]
    @Tnumber INT
    DECLARE @RETURNVAL varchar(3)
    as
    IF (@Tnumber > 400000)
    Begin
    Set @ReturnVal = "NO"
    End
    Else
    Begin
    Set @ReturnVal = "YES"
    End
    Select @ReturnVAL as [OLD ORDER]
    GO



    What is the event triggered after this stored procedure is triggered and
    writen to the screen. (in vb)
    I tried a few thing but could not get it working.

    Thanks
    Tdar
     
    TdarTdar, Nov 16, 2005
    #1
    1. Advertising

  2. DetailsVeiw.Selected event
    --
    [note: if this post answers your question, you can mark it as an answer
    using the web-based newsreader functions]
    -----
    HTH,
    Phillip Williams
    http://www.societopia.net
    http://www.webswapp.com


    "TdarTdar" wrote:

    > Using the following example:
    >
    > <asp:DetailsView ID="DetailsView1" runat="server"
    > DataSourceID="SqlDataSource1" Height="1px"
    > Width="100%">
    > <RowStyle Wrap="False" />
    > </asp:DetailsView>
    >
    > <asp:SqlDataSource ID="SqlDataSource1" runat="server"
    > ConnectionString="<%$ ConnectionStrings:Main_SystemConnectionString1 %>"
    > SelectCommand="GETOLDSHIPRECORD" SelectCommandType="StoredProcedure">
    > <SelectParameters>
    > <asp:QueryStringParameter Name="TNUMBER"
    > QueryStringField="tnumber" Type="String" Size="6" />
    > </SelectParameters>
    > </asp:SqlDataSource>
    >
    >
    > The Stored Procedure example is:
    >
    > Create Procedure [GETOLDSHIPRECORD]
    > @Tnumber INT
    > DECLARE @RETURNVAL varchar(3)
    > as
    > IF (@Tnumber > 400000)
    > Begin
    > Set @ReturnVal = "NO"
    > End
    > Else
    > Begin
    > Set @ReturnVal = "YES"
    > End
    > Select @ReturnVAL as [OLD ORDER]
    > GO
    >
    >
    >
    > What is the event triggered after this stored procedure is triggered and
    > writen to the screen. (in vb)
    > I tried a few thing but could not get it working.
    >
    > Thanks
    > Tdar
     
    Phillip Williams, Nov 16, 2005
    #2
    1. Advertising

  3. OOps. I meant SqlDataSource.Selected event. (The SqlDataSource object to
    which the DetailsView is databound.)

    "Phillip Williams" wrote:

    > DetailsVeiw.Selected event
    > --
    > [note: if this post answers your question, you can mark it as an answer
    > using the web-based newsreader functions]
    > -----
    > HTH,
    > Phillip Williams
    > http://www.societopia.net
    > http://www.webswapp.com
    >
    >
    > "TdarTdar" wrote:
    >
    > > Using the following example:
    > >
    > > <asp:DetailsView ID="DetailsView1" runat="server"
    > > DataSourceID="SqlDataSource1" Height="1px"
    > > Width="100%">
    > > <RowStyle Wrap="False" />
    > > </asp:DetailsView>
    > >
    > > <asp:SqlDataSource ID="SqlDataSource1" runat="server"
    > > ConnectionString="<%$ ConnectionStrings:Main_SystemConnectionString1 %>"
    > > SelectCommand="GETOLDSHIPRECORD" SelectCommandType="StoredProcedure">
    > > <SelectParameters>
    > > <asp:QueryStringParameter Name="TNUMBER"
    > > QueryStringField="tnumber" Type="String" Size="6" />
    > > </SelectParameters>
    > > </asp:SqlDataSource>
    > >
    > >
    > > The Stored Procedure example is:
    > >
    > > Create Procedure [GETOLDSHIPRECORD]
    > > @Tnumber INT
    > > DECLARE @RETURNVAL varchar(3)
    > > as
    > > IF (@Tnumber > 400000)
    > > Begin
    > > Set @ReturnVal = "NO"
    > > End
    > > Else
    > > Begin
    > > Set @ReturnVal = "YES"
    > > End
    > > Select @ReturnVAL as [OLD ORDER]
    > > GO
    > >
    > >
    > >
    > > What is the event triggered after this stored procedure is triggered and
    > > writen to the screen. (in vb)
    > > I tried a few thing but could not get it working.
    > >
    > > Thanks
    > > Tdar
     
    Phillip Williams, Nov 16, 2005
    #3
  4. Thanks for Phillip's suggestion.

    Hi Tdar,

    If what you want do is perform some post-processing after the DataSource
    control execute the select store procedure, I think Phillip's suggestion on
    utilizing the DataSource's Selected event is reasonable. Also, the updated,
    deleted.... events are the corresponding ones for post-processing Update,
    Delete... operation...

    If there're any other particular problem on this, please feel free to post
    here.

    Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    --------------------
    | Thread-Topic: Detailsview and stored Proc
    | thread-index: AcXq+Y6emuZfv3KeS4SkNFdhw8+OgA==
    | X-WBNR-Posting-Host: 64.253.156.46
    | From: "=?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?="
    <>
    | References: <>
    <>
    | Subject: RE: Detailsview and stored Proc
    | Date: Wed, 16 Nov 2005 14:03:21 -0800
    | Lines: 61
    | Message-ID: <>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="Utf-8"
    | Content-Transfer-Encoding: 7bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | Content-Class: urn:content-classes:message
    | Importance: normal
    | Priority: normal
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webcontrols:31176
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    |
    | OOps. I meant SqlDataSource.Selected event. (The SqlDataSource object
    to
    | which the DetailsView is databound.)
    |
    | "Phillip Williams" wrote:
    |
    | > DetailsVeiw.Selected event
    | > --
    | > [note: if this post answers your question, you can mark it as an answer
    | > using the web-based newsreader functions]
    | > -----
    | > HTH,
    | > Phillip Williams
    | > http://www.societopia.net
    | > http://www.webswapp.com
    | >
    | >
    | > "TdarTdar" wrote:
    | >
    | > > Using the following example:
    | > >
    | > > <asp:DetailsView ID="DetailsView1" runat="server"
    | > > DataSourceID="SqlDataSource1" Height="1px"
    | > > Width="100%">
    | > > <RowStyle Wrap="False" />
    | > > </asp:DetailsView>
    | > >
    | > > <asp:SqlDataSource ID="SqlDataSource1" runat="server"
    | > > ConnectionString="<%$ ConnectionStrings:Main_SystemConnectionString1
    %>"
    | > > SelectCommand="GETOLDSHIPRECORD"
    SelectCommandType="StoredProcedure">
    | > > <SelectParameters>
    | > > <asp:QueryStringParameter Name="TNUMBER"
    | > > QueryStringField="tnumber" Type="String" Size="6" />
    | > > </SelectParameters>
    | > > </asp:SqlDataSource>
    | > >
    | > >
    | > > The Stored Procedure example is:
    | > >
    | > > Create Procedure [GETOLDSHIPRECORD]
    | > > @Tnumber INT
    | > > DECLARE @RETURNVAL varchar(3)
    | > > as
    | > > IF (@Tnumber > 400000)
    | > > Begin
    | > > Set @ReturnVal = "NO"
    | > > End
    | > > Else
    | > > Begin
    | > > Set @ReturnVal = "YES"
    | > > End
    | > > Select @ReturnVAL as [OLD ORDER]
    | > > GO
    | > >
    | > >
    | > >
    | > > What is the event triggered after this stored procedure is triggered
    and
    | > > writen to the screen. (in vb)
    | > > I tried a few thing but could not get it working.
    | > >
    | > > Thanks
    | > > Tdar
    |
     
    Steven Cheng[MSFT], Nov 17, 2005
    #4
  5. Hi Tdar,

    Does our suggestion help you a little? If there're anything else we can
    help, please feel free to post here.

    Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    --------------------
    | X-Tomcat-ID: 126867111
    | References: <>
    <>
    <>
    | MIME-Version: 1.0
    | Content-Type: text/plain
    | Content-Transfer-Encoding: 7bit
    | From: (Steven Cheng[MSFT])
    | Organization: Microsoft
    | Date: Thu, 17 Nov 2005 06:20:58 GMT
    | Subject: RE: Detailsview and stored Proc
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    | Message-ID: <>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | Lines: 91
    | Path: TK2MSFTNGXA02.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webcontrols:31185
    | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
    |
    | Thanks for Phillip's suggestion.
    |
    | Hi Tdar,
    |
    | If what you want do is perform some post-processing after the DataSource
    | control execute the select store procedure, I think Phillip's suggestion
    on
    | utilizing the DataSource's Selected event is reasonable. Also, the
    updated,
    | deleted.... events are the corresponding ones for post-processing Update,
    | Delete... operation...
    |
    | If there're any other particular problem on this, please feel free to
    post
    | here.
    |
    | Thanks,
    |
    | Steven Cheng
    | Microsoft Online Support
    |
    | Get Secure! www.microsoft.com/security
    | (This posting is provided "AS IS", with no warranties, and confers no
    | rights.)
    | --------------------
    | | Thread-Topic: Detailsview and stored Proc
    | | thread-index: AcXq+Y6emuZfv3KeS4SkNFdhw8+OgA==
    | | X-WBNR-Posting-Host: 64.253.156.46
    | | From: "=?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?="
    | <>
    | | References: <>
    | <>
    | | Subject: RE: Detailsview and stored Proc
    | | Date: Wed, 16 Nov 2005 14:03:21 -0800
    | | Lines: 61
    | | Message-ID: <>
    | | MIME-Version: 1.0
    | | Content-Type: text/plain;
    | | charset="Utf-8"
    | | Content-Transfer-Encoding: 7bit
    | | X-Newsreader: Microsoft CDO for Windows 2000
    | | Content-Class: urn:content-classes:message
    | | Importance: normal
    | | Priority: normal
    | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    | | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
    | | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
    | | Xref: TK2MSFTNGXA02.phx.gbl
    | microsoft.public.dotnet.framework.aspnet.webcontrols:31176
    | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    | |
    | | OOps. I meant SqlDataSource.Selected event. (The SqlDataSource object
    | to
    | | which the DetailsView is databound.)
    | |
    | | "Phillip Williams" wrote:
    | |
    | | > DetailsVeiw.Selected event
    | | > --
    | | > [note: if this post answers your question, you can mark it as an
    answer
    | | > using the web-based newsreader functions]
    | | > -----
    | | > HTH,
    | | > Phillip Williams
    | | > http://www.societopia.net
    | | > http://www.webswapp.com
    | | >
    | | >
    | | > "TdarTdar" wrote:
    | | >
    | | > > Using the following example:
    | | > >
    | | > > <asp:DetailsView ID="DetailsView1" runat="server"
    | | > > DataSourceID="SqlDataSource1" Height="1px"
    | | > > Width="100%">
    | | > > <RowStyle Wrap="False" />
    | | > > </asp:DetailsView>
    | | > >
    | | > > <asp:SqlDataSource ID="SqlDataSource1" runat="server"
    | | > > ConnectionString="<%$
    ConnectionStrings:Main_SystemConnectionString1
    | %>"
    | | > > SelectCommand="GETOLDSHIPRECORD"
    | SelectCommandType="StoredProcedure">
    | | > > <SelectParameters>
    | | > > <asp:QueryStringParameter Name="TNUMBER"
    | | > > QueryStringField="tnumber" Type="String" Size="6" />
    | | > > </SelectParameters>
    | | > > </asp:SqlDataSource>
    | | > >
    | | > >
    | | > > The Stored Procedure example is:
    | | > >
    | | > > Create Procedure [GETOLDSHIPRECORD]
    | | > > @Tnumber INT
    | | > > DECLARE @RETURNVAL varchar(3)
    | | > > as
    | | > > IF (@Tnumber > 400000)
    | | > > Begin
    | | > > Set @ReturnVal = "NO"
    | | > > End
    | | > > Else
    | | > > Begin
    | | > > Set @ReturnVal = "YES"
    | | > > End
    | | > > Select @ReturnVAL as [OLD ORDER]
    | | > > GO
    | | > >
    | | > >
    | | > >
    | | > > What is the event triggered after this stored procedure is
    triggered
    | and
    | | > > writen to the screen. (in vb)
    | | > > I tried a few thing but could not get it working.
    | | > >
    | | > > Thanks
    | | > > Tdar
    | |
    |
    |
     
    Steven Cheng[MSFT], Nov 21, 2005
    #5
    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. David Lozzi
    Replies:
    3
    Views:
    1,941
    David Lozzi
    Jun 1, 2005
  2. John Dalberg
    Replies:
    0
    Views:
    458
    John Dalberg
    Mar 23, 2006
  3. NevilleDNZ
    Replies:
    9
    Views:
    448
    NevilleDNZ
    Aug 16, 2006
  4. Jean-Hugues ROBERT

    Why no Proc##[]=() ? Why no Proc##replace() ?

    Jean-Hugues ROBERT, May 1, 2004, in forum: Ruby
    Replies:
    14
    Views:
    293
    Jean-Hugues ROBERT
    May 5, 2004
  5. Minkoo Seo

    Proc vs lambda vs proc

    Minkoo Seo, Feb 4, 2007, in forum: Ruby
    Replies:
    19
    Views:
    246
    Brian Candler
    Feb 6, 2007
Loading...

Share This Page