Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim da As SqlDataAdapter
Dim SQLStr As String
Dim cnn As SqlConnection
DataGridView1.DataSource = Nothing
cnn = New SqlConnection(connectionString)
cnn.Open()
'Query för alla kolumner
SQLStr = "SELECT " & _
"CAST (tt.OrderNr AS varchar(10)) + ' – ' + PostIt.Text AS 'New Column' " & _
"FROM [myDB].dbo.OpusOrder as tt INNER JOIN" & _
"[myDB].dbo.CompanyMain as c On tt.bolagsnr = c.id INNER JOIN" & _
"[myDB].dbo.OpusOrderrow as ord On ord.ordernr = tt.ordernr INNER JOIN" & _
"[myDB].dbo.PostIt as PostIt On PostIt.ordernr = tt.ordernr INNER JOIN" & _
"[myDB].dbo.OrderCompanyLanguageName as snSrc ON ord.kallspraknr = snSrc.spraknr INNER JOIN" & _
"[myDB].dbo.OrderCompanyLanguageName as snTrg ON ord.malspraknr = snTrg.spraknr"
da = New SqlDataAdapter(SQLStr, TTCon)
Dim myDatatable As New DataTable()
da.Fill(myDatatable)
For Each row As DataRow In myDatatable.Rows
If Not row.Item(0).ToString().Contains("Language:") Then
row.Delete()
End If
Next
myDatatable.Columns(0).ColumnName = "Context Matches"
' I BELIEVE IT MUST BE HERE I MADE THE FUNCTION.
DataGridView2.DataSource = myDatatable
End Sub