摘要: 如果把sqlserver数据库比作一间屋子,可以分为三个层次: 1、找到这间屋子——实例未找到 2、找到屋子并打开门——sqlconnection 3、进屋之后,能够做饭——sqlcommand 这三种情况,最难处理的即是第一种情况,下面贴出来一段代码,作为参考: public static Dat 阅读全文
posted @ 2023-07-28 16:18 Joooannes 阅读(27) 评论(0) 推荐(0)
摘要: DataTable dt=new DataTable(); dt.Columns.Add("ID", typeof(int)); dt.Columns.Add("name",typeof(string)); dt.Columns.Add("sex", typeof(string)); dt.Colu 阅读全文
posted @ 2023-02-23 11:06 Joooannes 阅读(592) 评论(0) 推荐(0)
摘要: 主要是三种情况: 1、sqlcommand执行超时; 2、sqlconnection执行超时; 3、数据库掉线TCP连接不上,针对第三种情况代码如下: static void QuickOpen(this SqlConnection conn, int timeout) { // We'll use 阅读全文
posted @ 2023-02-16 10:05 Joooannes 阅读(773) 评论(0) 推荐(0)
摘要: SELECT * FROM TB_PDO WHERE COIL_NUMBER_IN IN (SELECT COIL_NUMBER_IN FROM TB_PDO GROUP BY COIL_NUMBER_IN HAVING COUNT(COIL_NUMBER_IN)>1) ORDER BY ID DE 阅读全文
posted @ 2023-02-15 09:44 Joooannes 阅读(77) 评论(0) 推荐(0)
摘要: #region 内存回收 [DllImport("kernel32.dll", EntryPoint = "SetProcessWorkingSetSize")] public static extern int SetProcessWorkingSetSize(IntPtr process, in 阅读全文
posted @ 2022-05-14 00:36 Joooannes 阅读(436) 评论(1) 推荐(0)
摘要: FolderBrowserDialog dialog = new FolderBrowserDialog(); dialog.ShowDialog(); pathName = dialog.SelectedPath; this.xmlPathValue1.Text = pathName; glbll 阅读全文
posted @ 2022-04-15 16:38 Joooannes 阅读(1706) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data; using System.Wi 阅读全文
posted @ 2022-04-11 10:02 Joooannes 阅读(86) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data.SqlClient; using 阅读全文
posted @ 2022-04-11 09:53 Joooannes 阅读(375) 评论(0) 推荐(0)
摘要: datagridview1属性AutoSizeColumnsMode设置为:Fill; datagridview1属性ColumnsHeadersHeightSizeMode设置为:EnableResizing; 阅读全文
posted @ 2021-01-07 10:57 Joooannes 阅读(387) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace TestLambda { class Progr 阅读全文
posted @ 2020-12-29 11:04 Joooannes 阅读(432) 评论(0) 推荐(0)