How can I declare the @NIF as a string
Dim sqlConString As String = "Server=localhost\TESTE;Database=tempTest;User Id=sa;Password=123"
Dim conn = New SqlConnection(sqlConString)
Try
Conn.Open()
Dim strSQL As String = "SELECT * From Computador Where Nifcliente = @NIF"
conn.Close()
Dim da As New SqlDataAdapter(strSQL, Conn)
Dim ds As New DataSet
da.Fill(ds, "Computador")
DataGrid.DataSource = ds.Tables(0)
Catch ex As SqlException
MsgBox(ex.Message, MsgBoxStyle.Critical, "SQL Error")
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "General Error")
End Try