Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Detailsview and stored Proc

Reply
Thread Tools

Detailsview and stored Proc

 
 
TdarTdar
Guest
Posts: n/a
 
      11-16-2005
Using the following example:

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

<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
 
Reply With Quote
 
 
 
 
Phillip Williams
Guest
Posts: n/a
 
      11-16-2005
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:
>
> <aspetailsView ID="DetailsView1" runat="server"
> DataSourceID="SqlDataSource1" Height="1px"
> Width="100%">
> <RowStyle Wrap="False" />
> </aspetailsView>
>
> <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

 
Reply With Quote
 
 
 
 
Phillip Williams
Guest
Posts: n/a
 
      11-16-2005
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:
> >
> > <aspetailsView ID="DetailsView1" runat="server"
> > DataSourceID="SqlDataSource1" Height="1px"
> > Width="100%">
> > <RowStyle Wrap="False" />
> > </aspetailsView>
> >
> > <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

 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      11-17-2005
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==?="
<(E-Mail Removed)>
| References: <(E-Mail Removed)>
<(E-Mail Removed)>
| Subject: RE: Detailsview and stored Proc
| Date: Wed, 16 Nov 2005 14:03:21 -0800
| Lines: 61
| Message-ID: <(E-Mail Removed)>
| 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.webcontro ls
| 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.webcontro ls:31176
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro ls
|
| 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:
| > >
| > > <aspetailsView ID="DetailsView1" runat="server"
| > > DataSourceID="SqlDataSource1" Height="1px"
| > > Width="100%">
| > > <RowStyle Wrap="False" />
| > > </aspetailsView>
| > >
| > > <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
|

 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      11-21-2005
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: <(E-Mail Removed)>
<(E-Mail Removed)>
<(E-Mail Removed)>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: http://www.velocityreviews.com/forums/(E-Mail Removed) (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.webcontro ls
| Message-ID: <(E-Mail Removed)>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro ls
| Lines: 91
| Path: TK2MSFTNGXA02.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontro ls: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==?="
| <(E-Mail Removed)>
| | References: <(E-Mail Removed)>
| <(E-Mail Removed)>
| | Subject: RE: Detailsview and stored Proc
| | Date: Wed, 16 Nov 2005 14:03:21 -0800
| | Lines: 61
| | Message-ID: <(E-Mail Removed)>
| | 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.webcontro ls
| | 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.webcontro ls:31176
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro ls
| |
| | 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:
| | > >
| | > > <aspetailsView ID="DetailsView1" runat="server"
| | > > DataSourceID="SqlDataSource1" Height="1px"
| | > > Width="100%">
| | > > <RowStyle Wrap="False" />
| | > > </aspetailsView>
| | > >
| | > > <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
| |
|
|

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Proc vs lambda vs proc Minkoo Seo Ruby 19 02-06-2007 11:13 AM
proc A def/calls proc B: variable scoping rules. NevilleDNZ Python 9 08-16-2006 04:36 AM
Convert VB.NET to TSQL PROC & Reference a Proc from another Proc David Lozzi ASP .Net 3 06-01-2005 06:35 PM
Why no Proc##[]=() ? Why no Proc##replace() ? Jean-Hugues ROBERT Ruby 14 05-05-2004 01:20 PM
What is the diff btwn 'sho proc' and 'sho proc cpu' William J King Cisco 1 12-18-2003 11:50 PM



Advertisments