ICode9

精准搜索请尝试: 精确搜索
  • .Net Core——用代码写代码?2022-01-06 15:03:52

    想要用代码写代码,肯定是绕不开反射的。反射的概念相比都不陌生,只是应用多少就因人而异,今天分享一个代码生成器的思路,仅供参考,不要过分依赖哦。 思路分析 众所周知,利用反射可以在程序运行时获取到任一对象的类型、属性、参数、方法等,并加以调用,利用这些获取到的可以在程序运行时追

  • SqlHelper 工具类2022-01-01 18:03:27

    SqlHelper 是一个自定义的工具类 将对数据库的操作封装起来 方便进行调用; 创建类库 右键解决方案-新建项目-选择 类库(.NET Framework) - 命名 Common 删除 初始化类,新建类 - 命名 SqlHelper 引用该类库 右键引用-添加引用-项目 获取数据库连接 string sqlcon = "Data S

  • SQLHelper2021-11-18 21:31:25

    怕忘了 后天就比赛了 存着随时看下 //查询数据集 public DataSet Query(string sqlStr) { using (SqlConnection conn = new SqlConnection(constr)) { using (SqlDataAdapter ada = new SqlDataAdapter(sqlStr, conn))

  • sqlHelper2021-11-16 23:00:49

    sqlHepler Connection,Command,DataReader,DataAdapter,DataSet1,Connection 对象 —— 连接数据库 首先与数据库进行连接;ConnectionString 数据库连接字符串,用于指定与哪种数据库进行连接。2.Command 对象 —— 执行SQL语句 连接数据库之后,就可以对数据源进行操作了。 对数

  • ado.net的简单数据库操作(三)——简单增删改查的实际应用2021-08-30 22:01:42

    果然,在犯困的时候就该写写博客,写博客就不困了,哈哈!   上篇我记录了自己的SqlHelper的开发过程,今天记录一下如何使用这个sqlhelper书写一个具有简单增删改查的小实例啦。   实例描述:在数据库新建一张TbClass表,将表的内容读取到一个DataGridView上,并且可以在winform面板上对表里

  • 连接池问题2021-08-24 14:35:01

    asp.net 数据连接池 异常:超时时间已到。超时时间已到,但是尚未从池中获取连接。出现这种情况可能是因为所有池连接均在使用,并且达到了最大池大小。 原因分析:asp.net的数据库连接池的连接都被占用了。 很多同学都表示不解,表示没有过数据库连接池。 怎么开启数据库连接池? 数据库连

  • SqlHelper帮助类2021-06-15 17:34:29

    SqlHelper帮助类   1 public class DbHelper 2 { 3 //数据库连接字符串(web.config来配置),多数据库可使用DbHelperSQLP来实现. 4 public static string connectionString = ConfigurationManager.ConnectionStrings[""].ConnectionString

  • SQLite在多线程并发访问的应用2021-05-20 09:05:14

    SQLite在多线程并发访问的应用   最近遇到个SQLite的问题把我卡住了小半天,最后总结一句话:SQLite不支持多线程 研究一下,发现有以下2种方案可行 1.首先当多个线程并发操作同一个数据库,同时存在insert、delete和select操作,数据是不安全的,在Android内置的SQLite中也是不允许的,这时会

  • SQLHelper通用帮助类2021-04-16 08:32:20

    using System; using System.Collections.Generic; using System.Text; using System.Collections; using System.Data; using System.Data.SqlClient; using System.Configuration; namespace HelloWinForm.DBUtility { class SQLHelper { #region 通用方法

  • 更新提示2020-09-23 22:35:24

    private void timer1_Tick(object sender, EventArgs e) { x++; if (x == 10) { string sql = "SELECT New_Version FROM VersionNumber"; string str = Convert.ToString(SqlHelper.SqlHelper.GetOneResult(sql)); if (str != ApplicationDeployment.CurrentDeploy

  • sqlhelper帮助类2020-06-20 11:02:33

    using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.SqlClient;using System.Configuration;using System.Reflection;//反射命名空间namespace Common{ /// <summary> /// 数据库操作帮助

  • Visual中SqlHelper的书写(*)2020-06-18 16:06:27

    1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Configuration; 6 using System.Data; 7 using System.Data.SqlClient; 插入引用 private static string strconn = ConfigurationManager.ConnectionStrings[

  • SQLHelper类2020-05-19 21:03:14

    private static string constr = ConfigurationManager.ConnectionStrings["constr"].ToString();//连接字符串从web.config或者app.config,使用时注意引用System.Configuation /// <summary> /// 通用非查询方法 /// </summary> /// <param

  • sqlHelper ---转载2020-03-11 22:06:25

    //引入命名空间 using System.Data.SqlClient; /// <summary> /// SqlHelper 的摘要说明 /// </summary> public class SqlHelper { private static readonly string sqlcon = ConfigurationManager.ConnectionStrings["enterpriseCon"].ConnectionString;

  • sqlHelper+app.config2020-03-11 22:01:02

    public class SqlHelper { /// <summary> /// 获取连接字符串 /// </summary> public static string ConString = ConfigurationManager.ConnectionStrings["HotelManagerConnectionString"].ToString(); public

  • sqlhelper函数2020-03-01 13:02:10

    using System;using System.Collections.Generic;using System.Configuration;using System.Data;using System.Data.SqlClient;using System.Linq;using System.Text;using System.Threading.Tasks;namespace UpdateUserId_ConsoleApp{    class sqlHelper    {     

  • SQLHelper ------ python实现2019-11-23 09:52:17

    SQLHelper ------ python实现 1.第一种: import pymysql import threading from DBUtils.PooledDB import PooledDB class SqlHelper(object): def __init__(self): self.pool = PooledDB( creator=pymysql, # 使用链接数据库的模块 maxconn

  • c# – 如何从table中选择tablename指定为SqlParameter?2019-07-21 20:08:37

    我正在尝试执行动态sql选择我在使用参数从表中选择的位置. SELECT null FROM @TableName 但是我收到错误必须声明表变量@TableName.我怀疑这是因为我正在使用变量从表中进行选择.我以前不需要这样做. List<SqlParameter> sqlParams = new List<SqlParameter>() { new SqlP

  • C# SqlHelper2019-06-29 11:41:52

    using System;using System.Collections.Generic;using System.Configuration;using System.Data;using System.Data.SqlClient;using System.Linq;using System.Text;using System.Threading.Tasks;namespace CarHailing.Base{ /// <summary> /// 数据库帮助类 ///

  • sqlHelper 类型的编写2019-05-02 19:38:34

    在进行jdbc程序编写的时候,因为对数据库操作很多, 如果访问数据库很频繁,Connection不要设置成static 当编辑jdbc.properties文件时,window最后一栏preference里面找到   防止SQL注入: package com.sql;import java.sql.*;public class Demo2 { public static void main(String[]

  • SqlHelper2019-04-28 15:39:46

    1 class SqlDataReader1 2 { 3 //连接字符串 4 public static readonly string connectString = ConfigurationManager.ConnectionStrings["xiaoCeShi"].ConnectionString; 5 /// <summary> 6 /// 输入名字模糊查询输出可能学生的ID和名字 7

  • 手写增删改查、SQLHelper2019-03-04 17:50:42

    使用sqlhelper的简单增删改查 一:所说的简单的三层构架,就是说没有业务逻辑层,将各层没有放到单独的项目中,解决方案如下: 二:form1.cs的详细代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using S

  • C#之SqlHelper2019-02-16 21:53:22

    <add name="ConnStr" connectionString="Data Source=.;Initial Catalog=test;User ID=sa;Password=123456"/>   using System; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Collections; names

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有