Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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


Ïà¹ØÎĵµ£º

AccessÊý¾Ý¿â°²È«ÉèÖü¼ÇÉ

²¿·ÖÂÛ̳ÐÂÊÖÃÇû¾¯Ìè×Ô¼ºÂÛ̳Êý¾Ý¿â´æÔÚµÄΣÏÕ£¬ËùÒÔ»¹ÊÇ ¾ö¶¨ÒÔDvbbs7.0ΪÀý£¬½éÉÜÒ»ÏÂÈçºÎ±£»¤ºÃÄãµÄAccessÊý¾Ý¿â ¡£Ïл°ÐÝ˵£¬ÇëÍùÏ¿´£º
1¡¢¸øÄãµÄAccessÊý¾Ý¿â¼ÓÉÏÃÜÂë±£»¤£¨ÆäʵAccessÊý¾Ý¿â µÄÃÜÂë±£»¤·Ç³£´àÈõ£¬ÕâÀֻÊǸøËû¶à¼ÓÉÏÒ»°ÑËø¶øÒÑ£©¡£
a.´ò¿ªMicroSoft AccessÈí¼þ£¬ÊÇÓöÀÕ¼·½Ê½´ò¿ªÄãµÄDVÂÛ Ì³Êý¾ ......

Êý¾Ý¿âÁ¬½ÓÖ®Ò»: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# ²Ù×÷mssqlÊý¾Ý¿â º¬Óдø²ÎÊýsqlÓï¾äÔËÐÐ

<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <appSettings>
  <add key="Default" value="Default" />
 </appSettings>
 <connectionStrings>
  <add name="Default" connectionString="Data Source=192.168.1.197;User ID ......

vb Á¬½ÓAccess×Ö·û´®¡¢vbÁ¬½ÓDb2µÄ×Ö·û´®

DB2ConnectionString
b2str = "Provider=MSDASQL.1;Password=a$sk6G7;Persist Security Info=True;User ID=DBA;Data Source=ConDB2SFXXK"
AccessConnectonString
accessstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DMSJK.mdb;Jet OLEDB:database password=" ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ