Torna al Thread
Dim IntContaRighe As Integer
m_conn.Open()
'Ciclo per ogni riga
Dim schemaTable As DataTable = m_conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, Nothing)
Dim cmd As OleDbCommand = New OleDbCommand("SELECT Cognome,Nome,DataNascita,Telefono FROM Persona ", m_conn)
Dim myReader As OleDbDataReader = cmd.ExecuteReader()
If m_conn IsNot Nothing Then
Dim i As Integer
For i = 0 To schemaTable.Rows.Count - 1
For IntContaRighe = 0 To 3
'ciclo per ogni colonna dove ci sono i dati
With XlshDati.Cells(IntContaRighe + 2)
.value = myReader(i).ToString()
.EntireRows.autofit()
End With
Next
Next
End If
m_conn.Close()