c# 操作数据库

    xiaoxiao2021-03-25  37

    c#操作数据库的主程序 using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using System.Data.SqlClient; namespace WindowsFormsApplication2 { static class Program { /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { SqlManage.cnn = new SqlConnection(SqlManage.connstring); SqlManage.cnn.Open(); } catch(Exception ex) { MessageBox.Show(ex.Message); Application.Exit(); return; } Application.Run(new Form3()); SqlManage.cnn.Close(); } } }
    转载请注明原文地址: https://ju.6miu.com/read-50080.html

    最新回复(0)