Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Only show records with certain value SQL in Visual Basic

$
0
0

Hi There,

I'm trying show only records within a database on SQL that match a certain value. This is showing the support tickets from a certain computer name. I'm fairly a noob at visual basic but this is what I get at the moment. The table is populated when running but with everything rather than just the computer name that I want. Here is the code;

Text
 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'Ticket_SystemDataSet2.Tickets' table. You can move, or remove it, as needed. Me.TicketsTableAdapter2.Fill(Me.Ticket_SystemDataSet2.Tickets) Dim strComputerName As String strComputerName = My.Computer.Name Dim connection As New SqlConnection connection.ConnectionString = "Data Source=SERVER;Initial Catalog=Ticket System;Integrated Security=True;Connect...

Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>