Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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();
- }
- }
- }
Add Comment
Please, Sign In to add comment