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

C# 创建Access数据库表

using System;
using System.IO;
using System.Windows.Forms;
using Access = Microsoft.Office.Interop.Access;
// 添加引用->.NET-> dao,Microsoft.Office.Interop.Access
namespace WinFormAccess
{
    public partial class FormAccess : Form
    {
        public FormAccess()
        {
            InitializeComponent();
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            try
            {
                string dbPath = Path.Combine(Application.StartupPath, "Images.mdb");
                if (File.Exists(dbPath))
                    File.Delete(dbPath);
                Access.Application newAccess = new Access.Application();
                newAccess.NewCurrentDatabase(dbPath);
                dao.Database db = newAccess.CurrentDb();
                //db.Execute("create table [Images] (Name String primary key, Bytes LongBinary)", Type.Missing);
                db


相关文档:

关于ASP.NET/C#中对Cookie的操作

写cookie
  1 HttpCookie cookie = new HttpCookie("Info");//定义cookie对象以及名为Info的项
  2 DateTime dt = DateTime.Now;//定义时间对象
  3 TimeSpan ts=new TimeSpan(1,0,0,0);//cookie有效作用时间,具体查msdn
  4 cookie.Expires = dt.Add(ts);//添加作用时间
  5 cookie.Values.Add("user","cx ......

Paging long articles in ASP.NET using C#

Paging long articles in ASP.NET using C#
Long articles are better broken into bite-sized chunks over several pages. With static HTML, this is easily achieved by dividing the article into logical separations and creating separate .htm files for each. Here's how to do it using C# for an article that ......

ASP.NET中Excel操作类C#版

using System;
using System.Data;
using System.Configuration;
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 Microsoft.Office.Inter ......

数据库连接之一:Access数据库连接字符串

Microsoft Jet OLE DB 4.0
Standard security:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;User Id=admin;Password=;
With database password:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;Jet OLEDB:Database Password=MyDbPassword;
Workgroup (system database):
Prov ......

c#操作access*转载

 
 
public static class AccessHelper
{
//数据库连接字符串
//WebForm
//public static readonly string conn_str = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + HttpContext.Current.Request.PhysicalApplicationPath + System.Configuration.ConfigurationManager ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号