親フォルダ
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Odbc;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BuildField
{
    public partial class Form1 : Form
    {
        // 単独
        //private TextBox textBox1;
        // 配列
        private TextBox[] textBoxArray;

        public Form1()
        {
            InitializeComponent();
            controlInit();
        }

        private void controlInit()
        {
            // 接続文字列を作成するオブジェクト
            OdbcConnectionStringBuilder builder = new OdbcConnectionStringBuilder();

            // 接続文字列を作成する為の情報を渡す
            builder.Driver = "MySQL ODBC 5.3 Unicode Driver";
            builder.Add("SERVER", "localhost");
            builder.Add("DATABASE", "lightbox");
            builder.Add("UID", "root");
            builder.Add("PWD", "");

            // 接続用のオブジェクト
            OdbcConnection myCon = new OdbcConnection();

            // 接続用のオブジェクトに接続文字列を渡す
            myCon.ConnectionString = builder.ConnectionString;

            // 実行後にレコードセットを取得する為のオブジェクトを作成
            OdbcDataReader myReader;

            try
            {
                // DB の接続
                myCon.Open();

                string myQuery = "SELECT * from 社員マスタ";

                // SELECT 実行用のオブジェクトを作成
                OdbcCommand myCommand = new OdbcCommand();
                // 実行する為に必要な情報をセット
                myCommand.CommandText = myQuery;
                myCommand.Connection = myCon;

                // ここで SELECT を実行してその結果をオブジェクトに格納する
                myReader = myCommand.ExecuteReader();

            }
            catch (Exception ex)
            {
                return;
            }

            int fieldCount = myReader.FieldCount;

            textBoxArray = new TextBox[fieldCount];

            for (int i = 0; i < fieldCount; i++) {
                // インスタンス作成
                textBoxArray[i] = new TextBox();
                // フォント設定
                textBoxArray[i].Font = new Font("MS UI Gothic", 12F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(128)));
                // 位置設定
                textBoxArray[i].Location = new Point(208, 42 + i * 35);
                // 名称設定
                textBoxArray[i].Name = "textBox"+(i+1);
                // 幅と高さの設定
                textBoxArray[i].Size = new Size(208, 23);
                // TAB の順序
                textBoxArray[i].TabIndex = i;

                Controls.Add(textBoxArray[i]);
            }

            myReader.Close();
            myCon.Close();
            myCon.Dispose();

        }
    }
}