Hello,
I have the following code:
And I'm trying to display my result from my sql query in the label that I have in my application, but it doesnt seem to work. I get no build errors and the SQL query works on its own. Can anyone assist me with this issue?
Thank you
Doug
I have the following code:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim connetionString As String
Dim cnn As SqlConnection
connetionString = "Data Source=localhost;Initial Catalog=Payroll;User ID=administrator;Passwordxxxxx"
cnn = New SqlConnection(connetionString)
cnn.Open()
Dim strSQL As String = "select payrolldate from payroll where payrolldate <= getdate (), select dateadd (day, 7, Getdate())"
Label1.Text = strSQL
cnn.Close()
End Sub
Thank you
Doug
Comment