sql serverÁ¬½ÓÊý¾Ý¿â×Ö·û´®
1¡¢WINDOWSÉí·ÝµÇ½£º
<connectionStrings>
<add name="connectionString" connectionString="Data Source=(local);Initial Catalog=AngelicaDB;Integrated Security=True" providerName="System .Data .SqlClient" />
</connectionStrings>¡¢
2¡¢sql serverÉí·ÝµÇ½£º
<connectionStrings>
<add name="connectionString" connectionString="Data Source=(local);Initial Catalog=AngelicaDB;User Id=sa; Password=; providerName="System .Data .SqlClient" />
</connectionStrings>
Ïà¹ØÎĵµ£º
http://support.microsoft.com/default.aspx/kb/237980/zh-cn
½« Access Êý¾Ý¿âת»»Îª SQL Server µÄ×î¼ò±ã·½·¨ÊÇʹÓÃÉýǨÏòµ¼¡£ÉýǨÏòµ¼£º
±£ÁôÊý¾Ý¿â½á¹¹£¬°üÀ¨Êý¾Ý¡¢Ë÷ÒýºÍĬÈÏÉèÖá£
×Ô¶¯½« Access ÓÐЧÐÔ¹æÔòºÍĬÈÏÉèÖÃת»»ÎªÊʵ±µÄ SQL Server µÈЧÄÚÈÝ¡£
ÔÚÉýǨºó±£³Ö±í¹ØϵºÍ²ÎÕÕÍêÕûÐÔ¡£
ÒªÔÚ Access 2000 ......
ÔÚSql Server Öе÷ÓÃJmail×é¼þ·¢ËÍÓʼþ
Ô¤±¸ÖªÊ¶
1£®OLE×Ô¶¯»¯º¯Êý
OLE×Ô¶¯»¯Ê¹Ó¦ÓóÌÐòÄܹ»¶ÔÁíÒ»¸öÓ¦ÓóÌÐòÖÐʵÏֵĶÔÏó½øÐвÙ×÷£¬»òÕß½«¶ÔÏ󹫿ªÒÔ±ã¿ÉÒÔ¶ÔÆä½øÐвÙ×÷¡£×Ô¶¯»¯¿Í»§¶ËÊǿɶÔÊôÓÚÁíÒ»¸öÓ¦ÓóÌÐòµÄ¹«¿ª¶ÔÏó½øÐвÙ×÷µÄÓ¦ÓóÌÐò£¬±¾ÎÄÖµµÃÊÇSql Server¡£¹«¿ ......
--²âÊÔ±í
create table tb_month
(monthid varchar(2),mongthName varchar(50))
insert into tb_month
select '01','Ò»ÔÂ'
union all select '02','¶þÔÂ'
union all select '03','ÈýÔÂ'
union all select '04','ËÄÔÂ'
union all select '05','ÎåÔÂ'
union all select '06','ÁùÔÂ'
union all select '07','ÆßÔÂ'
......
ÔÚSQL ServerÖÐ, ÎÒÃÇÓÐʱÐèÒªÔÚÇå¿ÕÊý¾Ý±íÖ®ºó£¬ÖØÐÂÌí¼Ó¼Ç¼ʱ£¬±êʶÁÐÖØдÓ1¿ªÊ¼¼ÆÊý¡£
ÎÒÃÇÖ»ÐèÒªÔÚ²åÈë¼Ç¼֮ǰ£¬Ö´ÐÐÏÂÃæµÄÃüÁ
DBCC CHECKIDENT (±íÃû, RESEED, 0)
Èç¹ûÊÇÇå¿Õ±íÖÐÄÚÈÝÔÙÖØÖñêʶÁпÉÒÔÑ¡ÔñʹÓà Truncate Table ÃüÁ
Truncate Table tablename
TRUNCATE TABLE ÔÚ¹¦ÄÜÉÏÓë²»´ø WHERE ×Ó¾äµÄ ......
select * from sq_donglong.achi_news where ID in (select ID from (select top 6 ID from sq_donglong.achi_news where SortID=82)a union all select ID from (select top 6 ID from sq_donglong.achi_news where SortID=84)b)
......