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
Ïà¹ØÎÊ´ð£º
//C ½Ó¿Ú
extern "C"
{
TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);
}
//ÎÒÔÚC#ÖÐÉùÃ÷
//µ÷ÓÃC DLL Öеĺ¯Êý
[DllImport("OCRapi.dll&quo ......
ÎÒÓÃAccessÊý¾Ý¿â×öÁËÒ»¸öͼÊéÊý¾Ý¿â£¬ÀïÃæÓÐÒ»¸ö×Ö¶ÎÊÇISBN£¬¾ÍÊÇISBNºÅ£¬µ«ÊÇÖ»µÄÒ»×Ü·ÖͼÊéдµÄISBNºÅ£¬ÓеÄûд£¬Ð´µÄÄÇÒ»²¿·ÖÓеÄISBNÊÇÖØ¸´µÄ£¬ÄÜ·ñÓÃSQLÓïÑÔ°ÑÖØ¸´µÄ¹ýÂ˵ô£¬µ«Ã»Ð´ISBNºÅµÄͼÊé²»ÄܹýÂ˵ô£¬È ......
ACCESSÊý¾Ý¿âÖÐÓÐÒ»¸ötablename±í£¬Éè¼ÆÈçÏÂ
±àºÅ,ÊéÃû,×÷Õß,³ö°æÊ±¼ä,³ö°æÉç,ISBN,Ŀ¼,¼ò½é
ÆäÖгý¡°±àºÅ¡±Îª×Ô¶¯±àºÅÍ⣬ÆäËü¶¼Îª¡°±¸×¢¡±
ÆäÖÐ"±àºÅ"άһ£¬ÔÚ¡°ISBN¡±ÖÐÓеÄΪ¿ÕÖµ£¬ ......
ÕâÁ½Ììѧϰ¡¶Delphi¼¼Êõ·½°¸±¦µä¡·Ò»ÊéÖеÚÈýÕ¹ØÓÚÓû§µÇ¼·½°¸µÄÀý×Ó£¬ÀûÓõÄÊÇSQl ServerÊý¾Ý¿âʵÏÖÓû§µÇ¼£¬±àÒëÔËÐж¼Ã»ÎÊÌ⣬¸ÃʵÏֵŦÄÜÒ²¶¼ÊµÏֵĺܺ㬵«ÊÇÆæ¹ÖµÄÊÇ£¬·´¸´ÔËÐÐÒ»¶Îʱ¼äºó£¬ÓÐʱÔڹرÕÕû¸ö ......
Âé·³¸÷λ°ïæ¿´¿´°¡
´úÂëÈçÏ£º
CoInitialize(NULL);
_ConnectionPtr pConn(__uuidof(Connection));
_RecordsetPtr pRst(__uuidof(Recordset));
pConn->ConnectionString="Provider ......