首页 > TAG信息列表 > CommandType

当使用MySql数据库时,第二次查询时报错“There is already an open DataReader associated with this Connection which must

1,由于MySqlConnection(数据库连接)的对象是全局变量引用,虽然可以通过关闭数据库连接清除报警,但占用资源较大。--未采用 1 MySqlConnection sqlConnection = new MySqlConnection(connectionstr); 2 sqlConnection.Open(); 3 //ToDo: 4 sqlConnection.Close(); 5 sqlConnection.D

.net Core 6 配置Dapper上下文类

.net Core 6  配置Dapper上下文类               ---类似于EF的dbContext  引入dapper原因:使用ef编写查询linq语句有点麻烦,所以使用dapper编写sql语句较为方便些 1、编写基层类,用于生成Dapper上下文类使用--并安装所需包       1-1、DapperDBContextOptions

备忘录:关于.net程序连接Oracle数据库

目录关于使用MSSM访问Oracle数据库关于. net 程序中连接Oracle数据库 志铭-2021年12月7日 21:22:15 关于使用MSSM访问Oracle数据库 安装访问接口组件:OraOLEDB.Oracle 官网可以下载,但是需要注册 下载地址:https://pan.baidu.com/s/1OpYmpReEJcPg4wNESWy61Q 要求服务器至少安装.

安吉星API文档:

地址: https://www.onstar.com.cn/mssos/sos/wechat/v1/process 解锁: {"alertTypes":[],"commandType":"unlockDoor","pin":"333333"} 上锁:{"alertTypes":[],"commandType":"lockDoor","pi

dolphinscheduler源码解析-NettyServerHandler

DolphinScheduler源码解析-NettyServerHandler 文章目录 DolphinScheduler源码解析-NettyServerHandler类定义类属性 类定义 @ChannelHandler.Sharable public class NettyServerHandler extends ChannelInboundHandlerAdapter 注解说明了这个handler可以被多个channe

ADO.NET 帮助类 参数传递 存储过程 分页

SQLHelper public class SqlHelper { private readonly string _constr = ConfigurationManager.ConnectionStrings["key"].ConnectionString; #region 增删改通用方法 public int ExecuteNonQuery(string sql, CommandType type, params Sq

C#连接SQL Server数据库(二)

执行SQL语句:Command对象 1.Command对象概述   Command对象是一个数据命令对象,主要功能是向数据库发送查询、更新、删除、修改操作的SQL语句。Command对象主要有以下几种方式。     SqlCommand:用于向SQL Server数据库发送SQL语句,位于System.Data.SqlClient命名空间。

MySQL 帮助类 MySQLHelper

/// <summary> /// MySqlHelper操作类 /// </summary> public sealed partial class MySQLHelper { public static readonly string DBConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings[""].ToString(

SQLServer 数据库封装类

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Data;using System.Configuration;namespace SQLHelper{ public static class SqlHelper { //从配置文件中获取连接字符串 readon

dapperHelper

    public class DapperHelper { /// 数据库连接名 private static string _connection = string.Empty; /// 获取连接名 private static string Connection { get { return _connection; } //set { _co

DbHelper

using System; using System.Collections.Generic;using System.Configuration;using System.Data;using System.Data.SqlClient;using System.Linq;using System.Text; namespace Asmkt.Database{    /// <summary>    /// SQL数据库帮助    /// </summary>    publi

NET Core 实战 Dapper 扩展数据访问

NET Core 实战:基于 Dapper 扩展你的数据访问方法 一、前言   在非静态页面的项目开发中,必定会涉及到对于数据库的访问,最开始呢,我们使用 Ado.Net,通过编写 SQL 帮助类帮我们实现对于数据库的快速访问,后来,ORM(Object Relational Mapping,对象关系映射)出现了,我们开始使用 EF、Dapper、