Torna al Thread
Sub crea_form()
risultato.Visible = True
gv.Visible = False
form_blocco.Visible = True
operazione.Text = "ins"
Try
Dim conn As New SqlConnection("Data Source=PC-MAURIZIO; Initial Catalog=NOTIFICHE;Integrated Security=SSPI")
Dim command1 As New SqlCommand("select loc_codice, loc_comune from localita", conn)
conn.Open()
Dim dr As SqlDataReader = command1.ExecuteReader()
Dim conta As Int16 = 0
Do While dr.Read
conta = conta + 1
Loop
visualizzaMessaggio(CStr(conta))
comune.DataSource = dr
comune.DataBind()
dr.Close()
Catch ex As Exception
s = ex.Message
s += "<br/>"
s += ex.StackTrace
visualizzaMessaggio(s)
End Try
End Sub