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

Access数据操作Update方法

using System.Data.OleDb; //这里要引用OleDb空间
public partial class addInfo : System.Web.UI.Page
{
    //数据库连接字符串
    static string strCon = @"provider = Microsoft.Jet.OLEDB.4.0;Data source = |DataDirectory|gyMDB.mdb";
    //以上方法为连接ACCESS 特定数据目录APP_DATA 下数据文件的方法。注意DATADIRECTORY 的使用。
    //申明连接数据源的对象和对数据源进行操作的对象
    OleDbConnection con = new OleDbConnection(strCon);
    OleDbCommand cmd = new OleDbCommand();
    //点击按钮添加记录
    protected void Page_Load(object sender, EventArgs e)
    {
        TextBox11.ReadOnly = false;
        TextBox11.Text = "这是学号";
        TextBox11.ReadOnly = true;
        TextBox12.Text = "这是准考证号";
        TextBox13.Text = "这是姓名";
        if (!Page.IsPostBack) { }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
      
        string A0 = TextBox11.Text; //0.学号
        string A1 = TextBox12.Text; //1.准考证号
        string A2 = TextBox13.Text; //2.姓名
        string A3 = DropDownList1.Text; //3.小学入学年月
        string A4 = DropDownList2.Text; //4.班号
        string A5 = DropDownList3.Text; //5.学生类别
        string A6 = TextBox1.Text.Trim(); //6.身份证号
        string A7 = DropDownList4.Text; //7.性别
  


相关文档:

Sql Server 和 Access 操作数据库结构Sql语句

新建表:
create table [表名]
(
[自动编号字段] int IDENTITY (1,1) PRIMARY KEY ,
[字段1] nVarChar(50) default '默认值' null ,
[字段2] ntext null ,
[字段3] datetime,
[字段4] money null ,
[字段5] int default 0,
[字段6] Decimal (12,4) default 0,
[字段7] image null ,
)
删除表:
Drop table [表 ......

获取Access用户定义的表名和各表的字段名

 public   static  DataTable GetSchemaTable(string connectionString)  //获取Access所有的表名;
        {
            using (OleDbConnection connection = new
    &n ......

Android: Requesting root access in your app

转帖:http://www.stealthcopter.com/blog/2010/01/android-requesting-root-access-in-your-app/
This snippet shows how root access can be requested inside an application in order to write a file into a place we do not have permission to access usually. Requesting root access will only work if your phon ......

VC++的ADO连接Access步骤

1:在StaAfx.h 中添加如下代码 #import "C:\\Program Files\\Common Files \\System\\ado\\msado15.dll" no_namespace rename("EOF","adoEOF")rename("BOF","adoBOF")
2:在BOOL CXXXApp::InitInstance()中初始化COM环境
   ::CoInitialize(NULL);
   释放COM环境
   ::CoUninitialize(); ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号