码迷,mamicode.com
首页 >  
搜索关键字:sqlcommand    ( 196个结果
获取时间
提取数据库中的值,绑定到控件中。代码是:SqlConnection con=new SqlConection("server=.;database=数据库;uid=数据库中的用户名;pwd=数据库中的密码");sql="select 数据库库中要绑定的字段名 from 表";SqlCommand c ...
分类:其他好文   时间:2017-09-16 17:12:45    阅读次数:184
C# SQL防注入
string sql = "select * from student where id like" +"@key";Sqlconnection con = new Sqlconnetion();Sqlcommand com =new Sqlcommand();SqlParameter prmid ... ...
分类:数据库   时间:2017-09-06 12:50:22    阅读次数:169
.NET Framework 2.0中的数据访问新特性
1. 异步数据访问 ? 支持异步数据编程 ? SqlConnection – BeginOpen – EndOpen ? SqlCommand – BeginExecuteNonQuery – BeginExecuteReader – BeginExecuteXmlReader – EndExecu ...
分类:Web程序   时间:2017-09-02 23:19:48    阅读次数:247
连接Sqlserver2008代码实例
{ public partial class _Default : System.Web.UI.Page { private SqlCommand cmd = new SqlCommand(); protected void Page_Load(object sender, EventArgs e) ...
分类:数据库   时间:2017-08-22 14:47:29    阅读次数:282
使用SqlCommand 执行SQL语句
string sConnectionString = @"server=(local)\SQLEXPRESS;database=Forum;Trusted_Connection=True"; using (SqlConnection conn = new SqlConnection(sConnect ...
分类:数据库   时间:2017-08-09 19:58:48    阅读次数:288
ADO.NET事务处理
执行ADO.NET事务包含四个步骤 以SqlTransaction对象为例介绍: 1)调用SqlConnection对象的BeginTransaction()方法,创建一个SqlTransaction对象,标志事务开始. 2)将创建的SqlTransaction对象分配给要执行的SqlCommand ...
分类:Web程序   时间:2017-07-23 21:12:48    阅读次数:224
Java链接SQL Server数据库
一丶 操作对象 与ASP.NET 对比 对象类型 ADO.NET JDBC 连接对象 SqlConnection java.sql.Connection 执行对象 SqlCommand java.sql.Statement 预编译执行对象 java.sql.PreparedStatement 存储过 ...
分类:数据库   时间:2017-07-12 19:56:22    阅读次数:210
mybatis一个怪异的问题: Invalid bound statement (not found)
Invalid bound statement (not found): me.tspace.pm.dao.UserDao.getUser at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:17 ...
分类:其他好文   时间:2017-07-10 19:17:53    阅读次数:250
ado:SqlDataAdapter的两种不同写法,以及SqlCommand的两种不同写法
原文发布时间为:2008-08-01 —— 来源于本人的百度文章 [由搬家工具导入] SqlDataAdapter:(它是自动打开连接且自动关闭的,所以可以不必显示打开关闭连接) SqlConnection conn = new SqlConnection(ConfigurationManager. ...
分类:数据库   时间:2017-07-09 16:20:36    阅读次数:217
ADO.NET删除和修改
//类 SqlConnection conn; SqlCommand cmd; public UsersData() { conn = new SqlConnection("server=.;database=Data0504;user=sa;pwd=123;"); cmd = conn.Creat ...
分类:Web程序   时间:2017-07-09 16:09:17    阅读次数:179
196条   上一页 1 ... 4 5 6 7 8 ... 20 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!