Torna al Thread

Private Sub Carica_Dati() Try strSQL = "SELECT COLUMN_NAME,DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,IS_NULLABLE,COLUMN_KEY,EXTRA,COLUMN_DEFAULT FROM INFORMATION_SCHEMA.COLUMNS" & _ " WHERE TABLE_SCHEMA = '" & LabelX2.Text & "' And TABLE_NAME = '" & LabelX3.Text & "'" Dim data_Adapter As MySqlDataAdapter ' Create the SqlDataAdapter. data_Adapter = New MySqlDataAdapter(strSQL, Con) ' Map Table. data_Adapter.TableMappings.Add("Table", "Campi") ' Fill the DataSet. m_DataSet = New DataSet() data_Adapter.Fill(m_DataSet) ' Bind the DataGrid control to the Contacts DataTable. dtgStructNewTbl.AutoGenerateColumns = False dtgStructNewTbl.DataSource = m_DataSet dtgStructNewTbl.DataMember = "Campi" Catch ex As Exception MessageBox.Show(ex.Message, "Error...", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5