Access ÖÐ×Ô¶¯±àºÅµÄ½â¾ö˼·
ÈçºÎÔÚ Access ÖвåÈëÒ»ÌõеļǼʱ,Ô¤ÏÈÖªµÀËûµÄ×Ô¶¯±àºÅIDÄØ?
Õâ¸öÎÊÌâÀ§ÈÅÁËÎҺܾÃ
ºóÀ´ÎÒÏëÁËÒ»¸öºÜ±¿°ì·¨
¾ÍÊÇÏȲåÈëÒ»Ìõ ËæÒâµÄÊý¾Ý µ±È»ÀïÃæÓÐÓÐÒ»¸öÄãʵÏÖÔ¤¶¨ºÃµÄ±êʶ
±ÈÈç
insert into cmd (classID,cmdType,cmd) values('temp','temp','temp')
È»ºóÕÒµ½Ëü ¶ÁÈ¡ËüµÄID
select * from cmd where classID='temp'
ÔÙ¸üÐÂËü
update cmd set classID=*,cmdType=*,cmd='*
ÕâÑùÕâ¸öID¾Í³öÀ´À²....
ºÃÓôÃÆ°¡ ¾õµÃÕâ¸ö°ì·¨Ì«´ÀÁË
ÓÐûÓиßÈËÓбȽϺõķ½·¨ »¹ÍûÖ¸½Ì!!
Ïà¹ØÎĵµ£º
ÔÚSQL ServerÖÐÄ£ºý²éѯͨ³£ÊÇÕâÑùµÄSelect * from articleTable where authorName like '%jacky%'
µ«ÊÇÔÚAccessÖÐÓÃÕâÌõÓï¾äÖ´ÐеÄʱºò¾¹È»·¢Ïֲ鲻³ö½á¹û£¬Ôõô¿ÉÄÜÄØ£¿
ºóÀ´²éÁËÏÂ×ÊÁÏ£¬·¢ÏÖÎÊÌâÈçÏ£º
Òª½øÐÐÄ£ºý²éÕÒ£¬Ôò±ØÐëʹÓÃͨÅä·û£¬ACCESS¿âµÄͨÅä·ûºÍSQL SERVERµÄͨÅä·û²»Ò»Ñù¡£
ACCESS¿âµÄͨÅä·ûΪ£º
*& ......
ÔÚдÕâƪ²©ÎĵÄʱºò£¬ÎÒÕæµÄÈ̲»×¡½ÐÒ»Éù£¬ËûÂèµÄ±ä̬£¬½ñÌì×öÒ»¸öÍøվʱºò£¬ÓÉÓÚÒªÓõ½ACCESS£¬ÄǾÍÓÃÁË£¬°Ñ֮ǰµÄÁ´½ÓÓï¾äCOPY+C¹ýÀ´
¿´¿´ÓÐʲôÎÊÌâ¡£
string connstr = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source="+System.Web.HttpContext.Current.Server.MapPath("window2003.mdb");
Ò»¿´£¬Ó¦¸ÃûʲôÎÊÌ ......
½ñÌ죬»¹ÊÇÔÚ×öÄǸöÏîÄ¿£¬ÒÀȻʹÓÃÍù³£µÄsqlhelperÓ÷¨£¬Íù³£µÄÊý¾Ý¿â²Ù×÷À࣬µ«ÊÇÆ«Æ«µ÷ÊÔ²»³É¹¦£¬¶øÇÒ×îÖØÒªµÄÊÇ£¬Ëü²»±¨´í
ÖÐÎç³Ô·¹»ØÀ´£¬±¾À´Ïë´òËã˯¸öÎç¾õµÄ£¬µ«ÊÇÏîÄ¿Ì«½ôÆÈÁË£¬ÓÚÊÇÓÖ¸ú³µ³µÑо¿ÁËÒ»ÖÐÎ磬×îºó£¬·¢ÏÖÈç¹û²»ÓÃ@²ÎÊý´«µÝµÄ»°£¬ÊÇÕý³£ÔËÐеģ¬ÓÚÊÇ°Ù¶ÈÁËһϣ¬ÄÇЩÈË˵ҪÓÓ£¿”µ±Õ¼Î»·û
......
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();
......