易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net连接access数据库进行添加更新删除查询操作

连接access数据库代码,写在一个单独的类里
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OleDb;
namespace AppWebDLL
{
    public class ConnApp
    {
        public OleDbConnection getCon() {
          
            string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+System.Web.HttpContext.Current.Server.MapPath("App_Data\\UserDB.mdb")+";Jet OLEDB:Database Password=admin";
            OleDbConnection objConnection = new OleDbConnection(strConnection);
            return objConnection;
        }
    }
}
我这习惯这样写的,在这里System.Web.HttpContext.Current.Server.MapPath是用来取得access的相对路径的,在这个类里想要使用System.Web.HttpContext.Current.Server.MapPath,先要引用system.web这个类。
增删改查代码,以我的类写的,这里要注意一个,如果你的字段和access的关键字一样,那么你就要在你的字段上加 [ ],如password是access的关键字,如果你的字段有这个,你在做操作的时候就要这样写[password]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AppWebDLL;
using System.Data;
using System.Data.OleDb;
using System.Collections;
namespace AppBLL
{
public class Land
{
ConnApp capp = new ConnApp();
OleDbConnection db;
OleDbCommand olecom = null;
//查询所有用户
public ArrayList GetAllUser() {
ArrayList alluserlist = new ArrayList();
db = capp.getCon();
try
{
string sql = "select USERNAME from userinfo";
olecom = new OleDbComman


相关文档:

asp.net问题,请教,急!!!

asp.net  基于vb。net编程语言   sql数据库
表1                                         ......

asp.net中容易混淆的ajax概念


AJAX是Asynchronous JavaScript and XML缩写。这个概念代表的是一种技术,当您在说“我在项目中使用了AJAX技术时”,只是代表了您使用客户端XMLHttpRequest对象与服务器端进行异步通信。不过因为随着AJAX技术的运用往往会带来丰富的客户端效果,因此对AJAX技术的广义理解也可以认为这是一种操作 ......

Fckeditor配置攻略 asp.net版

网络文本编辑器----Fckeditor之使用篇
1.下载Fckeditor,asp.net版分两部分,FCKeditor和FCKeditor.Net: ASP.Net Control。
官方网站:http://ckeditor.com/download
2.Fckeditor在项目中的集成。
  很简单,不再赘述。
参考文献:http://www.cnblogs.com/zhubo/archive/2008/10/21/using_fckeditor_net.html
常 ......

asp.net控件开发(二) 简单属

asp.net教程:asp.net控件开发(二)-简单属性
我们开发出来的控件一般都需要跟使用控件的人编程人员交互,其中交互有两个途径:一个是属性还有就是事件。属性可能是简单的类型如:int、string等并不太复杂的类型,也有比较复杂的类型如:集合。
  一、属性实现交互
  我们还是沿用上面的例子来添加属性 PicShow示例: ......

条件接收系统 (CAs:Conditional Access System)

条件接收系统 (CAs:Conditional Access System)
  有条件接收系统(CAS)是开展付费电视的核心技术,了解它的运行机制,掌握好它的使用和维护对付费电视业务的成功开展非常关键。CAS的组成包括有:用户管理系统SMS、业务信息生成系统SIG、节目管理PMS/SI编辑系统、节目调度处理EIS、用户授权管理系统SAS、条件接收CA等 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号