Checkboks - føre value med i Stored procedure.
I min exec UpdateShowMyInvoices vil jeg gerne have True eller false (1,0) med fra Checkboksen. Kan ikke rigtig få det til at virke.Cb_show_transferred.CheckedChanged
Burde jeg ikke bare kunne bruge det?
Private Sub Cb_show_transferred_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_show_transferred.CheckedChanged
Dim dreader As System.Data.SqlClient.SqlDataReader
' Setup database command
InvoiceCommand.CommandText = "exec UpdateShowMyInvoices '" & userId & "', & Cb_show_transferred.CheckedChanged & "
' Execute the stored procedure SP_INVOICE_VIEW
InvoiceCommand.CommandType = CommandType.Text
' Open connection to the database
If InvoiceSqlConnection.State <> ConnectionState.Open Then
InvoiceSqlConnection.Open()
End If
' Read the result in the database
dreader = InvoiceCommand.ExecuteReader()
dreader.Close()
InvoiceSqlConnection.Close()
RefreshInvoiceList()
End Sub