Advertisement
Advertisement
| 04.15.2008 at 03:58PM PDT, ID: 23325550 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: |
-- VB.NET Code --
Table name is Uptime. Status is the name of the Column to pull data out of -->
Dim rdr As SqlDataReader
sqlCom.Connection.Open()
sqlCom.CommandText = "GetInActive"
rdr = sqlCom.ExecuteReader(CommandBehavior.SingleResult)
Try
Do While rdr.Read
rdr.Item("Status").ToString()
Loop
Catch ex As Exception
End Try
--- SQL Stored Procedure ---
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
-- =============================================
-- Description: SP to retrieve InActive workstation names
-- =============================================
ALTER PROCEDURE GetInActive
(
@Status varchar(11) = 'InActive'
)
AS
-- BEGIN
SELECT Mac From Uptime
WHERE Status = @Status
-- END
GO
|