Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C#ÖÐÁ¬½Ó¼°²éѯAccess³öÏÖµÄÎÊÌâ

´óÏÀÃÇ£º
    ÕâÊÇÎÒÁ¬½ÓÊý¾Ý¿âµÄ´úÂë
            string strPath = Application.StartupPath + "\\Database.accdb";
            string ConStr = "provider=Microsoft.jet.oledb.4.0;Data source=" + strPath;
            OleDbConnection Olecon = new OleDbConnection(ConStr);
            Olecon.Open();
            string sql = "Select * from ѧÉúÐÅÏ¢ where ѧºÅ= '" + textBox1.Text.Trim() + "' ";
            OleDbDataAdapter da = new OleDbDataAdapter(sql, Olecon);
            DataSet ds = new DataSet();
            da.Fill(ds, "ѧÉúÐÅÏ¢");
            this.dataGridView1.DataSource = ds.Tables[0];
    ±¨´í£º
    {"ÕÒ²»µ½Îļþ 'E:\\Êý¾Ý¿â»ù±¾²Ù×÷\\Êý¾Ý¿â»ù±¾²Ù×÷\\bin\\Debug\\Database.accdb'¡£"}
    ʲôԭÒòÄØ¡­¡­
C# code:
@'E:\Êý¾Ý¿â»ù±¾²Ù×÷\Êý¾Ý¿â»ù±¾²Ù×÷\bin\Debug\Database.accdb'
??

ÄDz»ÊÇ˵ÁËÂð ÕÒ²»µ½Îļþ ÄãÄǸö·¾¶ÏÂÓÐÕâ¸öÎļþÂð£¿

C# code



Code highlighting produced by


Ïà¹ØÎÊ´ð£º

Access²éÕÒÖظ´ÎÊÌâ - ÆäËûÊý¾Ý¿â¿ª·¢ / Access

ÎÒÓÃAccessÊý¾Ý¿â×öÁËÒ»¸öͼÊéÊý¾Ý¿â£¬ÀïÃæÓÐÒ»¸ö×Ö¶ÎÊÇISBN£¬¾ÍÊÇISBNºÅ£¬µ«ÊÇÖ»µÄÒ»×Ü·ÖͼÊéдµÄISBNºÅ£¬ÓеÄûд£¬Ð´µÄÄÇÒ»²¿·ÖÓеÄISBNÊÇÖظ´µÄ£¬ÄÜ·ñÓÃSQLÓïÑÔ°ÑÖظ´µÄ¹ýÂ˵ô£¬µ«Ã»Ð´ISBNºÅµÄͼÊé²»ÄܹýÂ˵ô£¬È ......

ASP+ACCESSÊä³öÎÊÌâ - Web ¿ª·¢ / ASP

ÄÄÀï³ö´íÁË£¬Êä³öÕâÑùµÄ½á¹û£¿£¿
<%@ Page Language="VB" AutoEventWireup="false" aspcompat="true" CodeFile="Default.aspx.vb" Inherits="_Default" %&g ......

ʹÓÃRepeater¶ÁÈ¡access±í£¬Ò³Ãæ´ò¿ª·Ç³£Âý

accessÊý¾Ý¿â£¬Ö±½ÓʹÓà select ×ֶΠfrom ±í  ¶ÁÈ¡Êý¾Ý
È»ºóÔÚÒ³ÃæÖÐʹÓÃRepeaterÀ´ÏÔʾ
ÕâÕűíÓÐ2000ÌõÊý¾Ý£¬ËùÒÔÒ³Ãæ´ò¿ªµÄºÜÂý
Çë½Ì¸÷λÅóÓÑ£¬ÓÐûÓа취½â¾ö£¬Ìá¸ßµãËٶȣ¡
Ò»´ÎÈ«²¿¶ÁÍê ......

_access ÇëÎÊÕâ¸öº¯ÊýÊǸÉÂïÓõģ¿

ËüµÄ¶¨ÒåÊÇÕâÑùµÄ


_CRTIMP __checkReturn int __cdecl _access(__in_z const char * _Filename, __in int _AccessMode);



´ó¸ç£¬¿´¸öº¯ÊýÉùÃ÷¾ÍÄÜ¿´³öËû¸ÉɶµÄ£¿

´ÓÃüÃûÀ´¿´Ó¦¸ÃÊÇÅж ......

MFCÁ¬½ÓACCESS ³ö´í

Âé·³¸÷λ°ïæ¿´¿´°¡
´úÂëÈçÏ£º
CoInitialize(NULL);
  _ConnectionPtr pConn(__uuidof(Connection)); 
_RecordsetPtr pRst(__uuidof(Recordset));
pConn->ConnectionString="Provider ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ