therookie32
Member
- Joined
- Jan 31, 2006
- Messages
- 5
- Programming Experience
- Beginner
Hey i need to get the values from the stored procedure below, basically the Name, Description, and is Active values and display them in two textboxes and a checkbox. How can i do this? Or can it be done with this stored procedure? I havent been able to find any good examples on the web...
(I am converting an asp app to .net 2005 but dont know any asp...)
Stored Procedure:
(I am converting an asp app to .net 2005 but dont know any asp...)
Stored Procedure:
VB.NET:
[SIZE=2][COLOR=#0000ff]ALTER PROCEDURE [/COLOR][/SIZE][SIZE=2][dbo].[BE_WebApp_ProjectList]
@ProjectID [/SIZE][SIZE=2][COLOR=#0000ff]int [/COLOR][/SIZE][SIZE=2]= 0
[/SIZE][SIZE=2][COLOR=#0000ff]AS
If [/COLOR][/SIZE][SIZE=2]@ProjectID > 0
[/SIZE][SIZE=2][COLOR=#0000ff]Begin
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Select
[/COLOR][/SIZE][SIZE=2]*[/SIZE][SIZE=2][COLOR=#008000]/*,
[/COLOR][/SIZE][SIZE=2][COLOR=#008000]MONTH(BidDateTime) + '/' + DAY(BidDateTime) + '/' + YEAR(BidDateTime) BidDate,
[/COLOR][/SIZE][SIZE=2][COLOR=#008000]Datepart(hour, BidDateTime) + ':' + Datepart(minute, BidDateTime) BidTime*/
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]From [/COLOR][/SIZE][SIZE=2]tbl_Project
[/SIZE][SIZE=2][COLOR=#0000ff]Where [/COLOR][/SIZE][SIZE=2]ProjectID = @ProjectID
[/SIZE][SIZE=2][COLOR=#0000ff]End
Else
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Begin
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Select
[/COLOR][/SIZE][SIZE=2]ProjectID [/SIZE][SIZE=2][COLOR=#800000]'ID'[/COLOR][/SIZE][SIZE=2],
[/SIZE][SIZE=2][COLOR=#0000ff]Name[/COLOR][/SIZE][SIZE=2],
BidDate [/SIZE][SIZE=2][COLOR=#800000]'Bid Date'[/COLOR][/SIZE][SIZE=2],
[/SIZE][SIZE=2][COLOR=#0000ff]Case
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]When [/COLOR][/SIZE][SIZE=2]IsBid = 1 [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2][COLOR=#800000]'Bid - ' [/COLOR][/SIZE][SIZE=2]+ [/SIZE][SIZE=2][COLOR=#0000ff]convert[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]varchar[/COLOR][/SIZE][SIZE=2](50), ProjectID)
[/SIZE][SIZE=2][COLOR=#0000ff]When [/COLOR][/SIZE][SIZE=2]BillingRecordCreated = 1 [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2][COLOR=#800000]'Billing - ' [/COLOR][/SIZE][SIZE=2]+ [/SIZE][SIZE=2][COLOR=#0000ff]convert[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]varchar[/COLOR][/SIZE][SIZE=2](50), ProjectID)
[/SIZE][SIZE=2][COLOR=#0000ff]When [/COLOR][/SIZE][SIZE=2]IsJob = 1 [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2][COLOR=#800000]'Job - ' [/COLOR][/SIZE][SIZE=2]+ [/SIZE][SIZE=2][COLOR=#0000ff]convert[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]varchar[/COLOR][/SIZE][SIZE=2](50), ProjectID)
[/SIZE][SIZE=2][COLOR=#0000ff]Else
[/COLOR][/SIZE][SIZE=2][COLOR=#800000]'Unknown - ' [/COLOR][/SIZE][SIZE=2]+ [/SIZE][SIZE=2][COLOR=#0000ff]convert[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]varchar[/COLOR][/SIZE][SIZE=2](50), ProjectID)
[/SIZE][SIZE=2][COLOR=#0000ff]End AS [/COLOR][/SIZE][SIZE=2][COLOR=#800000]'Status - #'[/COLOR][/SIZE][SIZE=2],
ApproximateSize [/SIZE][SIZE=2][COLOR=#800000]'Approximate Size'
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]From [/COLOR][/SIZE][SIZE=2]tbl_Project
[/SIZE][SIZE=2][COLOR=#0000ff]Where [/COLOR][/SIZE][SIZE=2]RecordActive = 1
[/SIZE][SIZE=2][COLOR=#0000ff]Order By [/COLOR][/SIZE][SIZE=2]BidDateTime [/SIZE][SIZE=2][COLOR=#0000ff]Desc
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE]