我试图找出如何引出某种表来查看已填充的DataSet。我无法正确地将代码可视化。
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using MySql.Data;
using MySql.Data.MySqlClient;
namespace Decoupled_Data
{
class Program
{
static void Main(string[] args)
{
string connStr =
"server=localhost; user=root; database=job_ticket_foil_summary;port=3306;password=ttnstamping";
MySqlConnection conn = new MySqlConnection(connStr);
DataSet dsCountry = new DataSet();
string sql = "SELECT * FROM jt_foil_summary";
MySqlDataAdapter daCountry = new MySqlDataAdapter(sql, conn);
MySqlCommandBuilder cb = new MySqlCommandBuilder(daCountry);
daCountry.Fill(dsCountry, "jt_foil_summary");
//Table of Data should appear here
Console.ReadLine();
}
}
}