i am currently building an ASPX webpage for internal use. Basically, there are two buttons on this page and I need each one to kick off a different stored procedure on our local SQLServer based on the needed task.
these stored rocedures do quite a bit of work and take 3-5 minutes to finish running. In neither case do I need any kind of gridview or other output from these stored procedures, as they are simply crunching/cleaning data that will populate some tables that the user will then use to complete their task. There are also no inputs or parameters needed.
So i'm OK at ASPX and pretty good at SQL, but have no idea on the VB code behind page. This is what I have ben able to put together based on 3 days of googling. i think i am close but can't quite get across the line.
Imports System.Data.SqlClient
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub RunBillingButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles RunBillingButton.Click
RunBillingButton.Attributes.Add("onclick", "return confirm('Did you remember to check the Box?');")
Dim con As String = ConfigurationManager.ConnectionStrings("KFileAddString").ConnectionString
Dim cmd As New SqlCommand("sp_Production")
cmd.CommandType = Data.CommandType.StoredProcedure
con.Open()
If CheckBox1.Checked = True Then
cmd.CommandText = "sp_Production"
End If
End Sub
End Class
I'm not sure if you need to see any of my ASPX or my SQL. both work fine on their own, but i am not able to get these buttons to work.
Thanks
Oscar Stiles

New Topic/Question
Reply



MultiQuote




|