Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- con.ConnectionString = "Server = ;Database=;User Id=;Password = ;"
- conecta.Open()
- comando.Connection = con
- cmd = New SqlCommand("prdInserirRegistro", con)
- cmd.CommandType = CommandType.StoredProcedure
- cmd.Parameters.Add(New SqlParameter("@dtLog", SqlDbType.DateTime, 30))
- cmd.Parameters.Add(New SqlParameter("@dsLog", SqlDbType.VarChar, 200))
- 'recebe o parâmetro selecionado na combobox
- cmd.Parameters("@dtLog").Value = Now
- cmd.Parameters("@dsLog").Value = txtBoxLog.Text
- cmd.ExecuteNonQuery()
- Catch ex As Exception
- MsgBox("erro em: " & ex.Message)
- Finally
- If Not con Is Nothing Then
- con.Close()
- con.Dispose()
- End If
- con = Nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement