摘要: 数据库中确实存在该条记录,但写到一个包含中文的where条件查询语句时,怎么修改,都无法查询出结果来 原因:数据库是英文版本的,所以数据库中的字段值是unicode编码的 首先看看字段类型是不是 : char ->nchar varchar ->nvarchar text ->ntext 然后在查询 阅读全文
posted @ 2024-04-28 15:21 船长华莱士 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 2024-01-24 15:04:18 解决方案: 阅读全文
posted @ 2024-01-24 15:05 船长华莱士 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 1. 使用Aspose.Cells合并单元格 下载Aspose包,可以去Nuget网站下载NuGet Gallery | Packages matching aspose 也可以使用vs安装Nuget包 语法: public void Merge(int firstRow, int firstCol 阅读全文
posted @ 2023-12-13 18:01 船长华莱士 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 转载自:SQLServer字符串查找(判断字符串是否含中文,数字或字母),并把是否含中文作为条件来执行一些操作 - 亟待! - 博客园 (cnblogs.com) 从sqlserver中提取数据如何截取字符 1、LOCATE(substr , str ):返回子串 substr 在字符串 str 中 阅读全文
posted @ 2023-11-28 10:58 船长华莱士 阅读(976) 评论(0) 推荐(0) 编辑
摘要: string str = “AAAA bbb shsh slsls”; string[] arrContent = Regex.Split(str , @"\s{1,}"); //split by spaces(one or more) 阅读全文
posted @ 2023-11-22 23:31 船长华莱士 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 1. 窗体起始位置Position 设置 (1) 窗体起始位置为顶部中间,WinForm居中显示: int x = (System.Windows.Forms.SystemInformation.WorkingArea.Width - this.Size.Width) / 2; int y = (S 阅读全文
posted @ 2023-11-19 14:23 船长华莱士 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 1. 在线RSA加密,选用PKCS#1来生成公钥与私钥 http://web.chacuo.net/netrsakeypair 2. 下载前端JS框架 http://travistidwell.com/jsencrypt/ 3. 流程图 加解密过程: 先从网站上生成publicKey与private 阅读全文
posted @ 2023-10-25 09:16 船长华莱士 阅读(233) 评论(1) 推荐(0) 编辑
摘要: 1. c# 读写文件时文件正由另一进程使用,因此该进程无法访问该文件 问题描述: c# 读写文件时文件正由另一进程使用,因此该进程无法访问该文件,在IO处理上遇到了无法操作的问题 使用IO流如下 (1) FileStream fs = File.OpenRead(url); StreamReader 阅读全文
posted @ 2023-10-25 08:57 船长华莱士 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 1. 安装nuget包 NPOI 2. 读取Excel到DataTable中 /// <summary> /// 将excel导入到datatable /// </summary> /// <param name="filePath">excel路径</param> /// <param name= 阅读全文
posted @ 2023-10-25 08:36 船长华莱士 阅读(387) 评论(0) 推荐(0) 编辑
摘要: 1. 修改表名: 修改student表名为emp:ALTER TABLE student RENAME TO emp; 2、向表中添加一列 ALTER TABLE emp ADD COLUMNS(address STRING); 3. 向表中删除一列 ALTER TABLE emp DROP COL 阅读全文
posted @ 2023-10-25 08:29 船长华莱士 阅读(27) 评论(0) 推荐(0) 编辑