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¾Í³öÀ´À²....
ºÃÓôÃÆ°¡ ¾õµÃÕâ¸ö°ì·¨Ì«´ÀÁË
ÓÐûÓиßÈËÓбȽϺõķ½·¨ »¹ÍûÖ¸½Ì!!
Ïà¹ØÎĵµ£º
½ñÌì̸Á½¸öASPÔËÐÐʱ¿ÉÄܳöÏÖµÄÓëIISÓйصĴíÎó
-------------------------------------------------------------------
´íÎóÀàÐÍÒ»£º
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] ²»ÄܸüС£Êý¾Ý¿â»ò¶ÔÏóΪֻ¶Á¡£
´íÎóÀàÐͶþ£º
Microsoft OLE DB Provider ......
ÔÚдÕâƪ²©ÎĵÄʱºò£¬ÎÒÕæµÄÈ̲»×¡½ÐÒ»Éù£¬ËûÂèµÄ±ä̬£¬½ñÌì×öÒ»¸öÍøվʱºò£¬ÓÉÓÚÒªÓõ½ACCESS£¬ÄǾÍÓÃÁË£¬°Ñ֮ǰµÄÁ´½ÓÓï¾äCOPY+C¹ýÀ´
¿´¿´ÓÐʲôÎÊÌâ¡£
string connstr = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source="+System.Web.HttpContext.Current.Server.MapPath("window2003.mdb");
Ò»¿´£¬Ó¦¸ÃûʲôÎÊÌ ......
<?php
$connstr="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("data.mdb");
$connid=odbc_connect($connstr,"","",SQL_CUR_USE_ODBC);
$issuetime=date("Y-m-d H:i:s");
$sql="insert into test values("","",...)";
$result=odbc_exec($connid,$sql);
if($result) echo "successful";
else ec ......
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();
......
Ç°¼¸ÌìΪÖÆ×÷Ò»¸öÍøÕ¾£¬ÐèÒª´ÓACCESSתÖÁSQLSERVER£¬´ÓÍøÕ¾Éϲ鿴Á˺ܶàµÄ×ÊÁÏ£¬µ«¾õµÃûÓÐÒ»¸öÄܹ»È«Ã渲¸ÇÒªµãµÄ£¬ËùÒÔÎÒ×ܽáһϣ¬Ë³±ã
¸ø³öһЩ¾Ñé¡£
Ê×ÏÈÈç¹ûÒ»¿ªÊ¼¾ÍÐèÒªÖÆ×÷SQLSERVERµÄÍøÕ¾£¬ÄÇô×îºÃ½«ÄãµÄ°®»ú×°ÉÏWINDOWS2000»òÕß2003ÕâÑùµÄSERVER°æ£¬ÕâÑùµÄ°æ±¾ÊÇÖ§³Ö
SQLSERVERÕýʽ ......