Loading ...
Sorry, an error occurred while loading the content.

Tolong donk temen2, masalah SP Mssql + VB

Expand Messages
  • asan lim
    saya membuat sp di mssql2000 ... CREATE PROCEDURE SP_LABA_RUGI @tgl_mulai as DATETIME, @tgl_siap as DATETIME AS     IF OBJECT_ID( tempdb..#LABA_RUGI ) IS
    Message 1 of 4 , Aug 4, 2009
    • 0 Attachment
      saya membuat sp di mssql2000
      ---------------------------------------------------------------------------------------
      CREATE PROCEDURE SP_LABA_RUGI @tgl_mulai as DATETIME, @tgl_siap as DATETIME
      AS
          IF OBJECT_ID('tempdb..#LABA_RUGI') IS NOT NULL
              DROP TABLE #LABA_RUGI
         
          CREATE TABLE #LABA_RU

      ---------------------------------------------------------------------------------------

      dan di VB :
      ---------------------------------------------------------------------------------------

      Dim cmd As New ADODB.Command
      Dim parm As New ADODB.Parameter
      Dim parm2 As New ADODB.Parameter
      Dim rs As New ADODB.Recordset
      Private Sub Command1_Click()

      cmd.ActiveConnection = CON
      cmd.CommandType = adCmdStoredProc
      cmd.CommandText = "sp_laba_rugi"

      'Set parm = cmd.CreateParameter("TGL1", adDate, adParamInput, , DTPicker1.Value)
      'Set parm2 = cmd.CreateParameter("tgl2", adDate, adParamInput, , DTPicker2.Value)

      Set parm = cmd.CreateParameter("TGL1", adChar, adParamInput, 16, DTPicker1.Value)
      Set parm2 = cmd.CreateParameter("tgl2", adChar, adParamInput, 16, DTPicker2.Value)

      cmd.Parameters.Append parm
      cmd.Parameters.Append parm2

      Set rs = cmd.Execute
      'RST.Open
      MsgBox rs(2)
      End Sub



      tetapi selalu gagal : dan muncul pesan error
      Item cannot be found in the collection corresponding to the requested name or ordinal
      Run-time error : '3265'

      ada yg bisa bantu


      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.