Visto che nell'altro modo mi sono piantato, ho provato a recuperare le informazioni sui campi attraverso ADOX, così facendo..
ho notato però che nel terzo ciclo for (quello in rosso) il programma non ci entra e con altre provate ho visto che oColumn.Properties.Count restituisce 0 per tutti i campi. Perchè ?codice:Public Sub TableProperties(TableName As String) Dim oCat As New ADOX.Catalog Dim oTable As ADOX.Table Dim oColumn As ADOX.Column Dim oProp As ADOX.property oCat.ActiveConnection = "Driver={MySQL ODBC 3.51 Driver};server=server;uid=root;pwd=;database=" & mydb For Each oTable In oCat.Tables If oTable.Type = "TABLE" Then If UCase(oTable.Name) = UCase(TableName) Then For Each oColumn In oTable.Columns MsgBox "Column: " & oColumn.Name For Each oProp In oColumn.Properties MsgBox "Property: " & oProp.Name & ", Value: " & oProp.Value Next Next End If End If Next Set oProp = Nothing Set oColumn = Nothing Set oTable = Nothing Set oCat = Nothing End Sub
Dove ho sbagliato ?
grazie mille di nuovo
Marco
![]()