CREATE PROCEDURE
sysDateTimeSELECT
@DateTime DATETIME OUTPUT
AS
BEGIN
SELECT
@DateTime=GETDATE()
END
Pada VB.NET ketikan kode berikut:
Dim rsDateTime As New ADODB.Recordset
With SQLCommand
.CommandText = "sysDateTimeSELECT"
.Parameters.Clear()
.Parameters.Add("@DateTime", SqlDbType.DateTime).Value = ""
.Parameters("@DateTime").Direction = ParameterDirection.Output
SQLReader = .ExecuteReader
End With
MsgBox(SQLCommand.Parameters("@DateTime").Value)
SQLReader.Close()
SQLReader = Nothing
0 komentar:
Posting Komentar