access实例谁有吖``?
/db/ess/sl/Index.htm
这个页面要好好看看
会对你有很大的帮助
各方面的都有,取你所需吧
· 基于ess数据库的抽奖系统设计
· 在ess中模拟sql server存储过程翻页
· 用Maxthon ess远程登录自己的电脑
· 1小时学会ess 轻松打造图书管理系统
· 非ess数据库在VB中的编程及应用
· 在ess数据库中实现密码管理
· 获取Windows / System / Temp 目录路径
· 创建一个空数据库
· 隐藏 ess 窗口
· 建立ess 数据库的安全门
· 使用ess提高企业管理器功能
· VB两种操作ess数据库方法的比较
· 旧版数据库转换至ACCESS2000的注意事项
· 创建一个空数据库
· 获取Windows / System / Temp 目录路径等等
Access 2007 数据库实例。登陆窗体代码怎么写?
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
public partial class Login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void buttonLogin_Click(object sender, ImageClickEventArgs e)
{
Disease dis = new Disease();
if (dis.CheckAdmin(textName.Text, textPassword.Text))
{
HttpCookie cookie = new HttpCookie("Admin");
cookie.Values["AdminName"]= textName.Text;
cookie.Expires = DateTime.MaxValue;
Response.AppendCookie(cookie);
Response.Redirect("ManageDisease.aspx");
}
else
{ labelMessage.Text = "用户名或密码错误!"; }
}
}
如何向access数据库文件插入数据,请给个最简单的例子
winform c# ess
1.insert
public void NewData(String GroupNameSet)
{
String sql = "insert into mytable(GroupNameSet) values(@GroupNameSet)";
= new OleDbConnection(_ConnectionString);
OleDbCommand cmd = new OleDbCommand(sql,);
cmd.Parameters.AddWithValue("@GroupNameSet", GroupNameSet);
if .State != ConnectionState.Open)
.Open();
try
{
cmd.ExecuteNonQuery();
}
catch (Exception err)
{
throw err;
}
finally
{
if .State != ConnectionState.Closed)
.Close();
}
}
2.update
public void UpdateData(String GroupNameSet,String pkid)
{
String sql = "update mytable set GroupNameSet=@GroupNameSet where pkid=@pkid";
= new OleDbConnection(_ConnectionString);
OleDbCommand cmd = new OleDbCommand(sql,);
cmd.Parameters.AddWithValue("@GroupNameSet", GroupNameSet);
cmd.Parameters.AddWithValue("@pkid", pkid);
if .State != ConnectionState.Open)
.Open();
try
{
cmd.ExecuteNonQuery();
}
catch (Exception err)
{
throw err;
}
finally
{
if .State != ConnectionState.Closed)
.Close();
}
}
3.delete
public void DeleteData(String pkid)
{
String sql = "delete from mytable where pkid=@pkid";
= new OleDbConnection(_ConnectionString);
OleDbCommand cmd = new OleDbCommand(sql,);
cmd.Parameters.AddWithValue("@pkid", pkid);
if .State != ConnectionState.Open)
.Open();
try
{
cmd.ExecuteNonQuery();
}
catch (Exception err)
{
throw err;
}
finally
{
if .State != ConnectionState.Closed)
.Close();
}
}
4.select
public DataTable GetData()
{
//从数据库中读出数据
String sql = "select * from mytable";
OleDbDataAdapter da = new OleDbDataAdapter(sql, new OleDbConnection(_ConnectionString));
//da.SelectCommand.Parameters.Add(p0);
try
{
if .State != ConnectionState.Open)
.Open();
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}
catch (Exception err)
{
return null;
}
finally
{
if .State != ConnectionState.Closed)
.Close();
}
}
5.connection string:
public static String ConnectionString_unEncry
{
get
{
String str = String.Format(@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source={0}essDatabase.mdb", System.Windows.Forms.Application.StartupPath);
return str;
}
}