Dim query As String
Dim comando As SqlCommand
Dim dr As SqlDataReader
Dim valore_restituito as string = ""
query = "SELECT * FROM Tabella WHERE ID=@ID"
comando = New SqlCommand(query, Connessione)
comando.Parameters.AddWithValue("ID", ID)
dr = comando.ExecuteReader
If dr.HasRows = True Then
   While dr.Read
      valore_restituito = dr(0)
   End While
End If
dr.Close()
Copyright © 2013 - All Rights Reserved - mariolomonaco.it