ÓÃTSQL°ÑAccessµÄ±íµ¼Èëµ½Ô¶³ÌSql Server
ÓÃTSQL°ÑAccessµÄ±íµ¼Èëµ½Ô¶³ÌSql Server£º
°Ñaccess µÄ.mdbÀït_itemList ±íµÄÊý¾Ý²åÈëµ½Ô¶³ÌSqlServerµÄt_itemL1111111±íÀï¡£
SELECT top 10 * INTO t_itemL1111111 IN [ODBC]
[ODBC;Driver=SQL Server; UID=jyb;PWD=jyb;Server=10.1.18.49;DataBase=ËùÓкϲ¢;]
from t_itemList
Ïà¹ØÎĵµ£º
´ÓA±íËæ»úÈ¡2Ìõ¼Ç¼,ÓÃSELECT TOP 10 * from ywle order by newid()
order by Ò»°ãÊǸù¾Ýijһ×Ö¶ÎÅÅÐò,newid()µÄ·µ»ØÖµÊÇuniqueidentifier ,order by newid()Ëæ»úÑ¡È¡¼Ç¼ÊÇÈçºÎ½øÐеÄ
newid()ÔÚɨÃèÿÌõ¼Ç¼µÄʱºò¶¼Éú³ÉÒ»¸öÖµ, ¶øÉú³ÉµÄÖµÊÇËæ»úµÄ, ûÓдóСд˳Ðò. ËùÒÔ×îÖÕ½á¹ûÔÙ°´Õâ¸öÅÅÐò, ÅÅÐòµÄ½á¹ûµ±È»¾ÍÊÇÎÞÐòµ ......
C#Á¬½ÓÁ¬½ÓAccess
Ê×ÏÈ¿´Ò»¸öÀý×Ó´úÂëƬ¶Ï:
³ÌÐò´úÂë:
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=C:\BegASPNET\Northwin ......
ÓÒ»÷ÒªÇå³ýÈÕÖ¾µÄÊý¾Ý¿â Ñ¡ÔñÊôÐÔ
ÔÚÊý¾Ý¿âÊôÐÔÖÐ Ñ¡ÔñÑ¡Ïî ÔÚÓұ߻ָ´Ä£Ê½ÏÂÀÁбí¿òÖÐ Ñ¡Ôñ¼òµ¥ µ¥»÷È·¶¨ ·µ»Ø
ÓÒ»÷ÒªÇå³ýÈÕÖ¾µÄÊý¾Ý¿â Ñ¡ÔñÈÎÎñ-ÊÕËõ-Êý¾Ý¿â µ¥»÷È·¶¨
Íê³ÉÊÕËõ ÈÕÖ¾Îļþ´óС±äΪ0 ......
Ò»°ãµÄÔ¶³Ì·ÃÎʵÄд³ÉÕâÑù£º
Data Source=IP;Initial Catalog=Êý¾Ý¿âÃû;UserID=Óû§Ãû;Password=ÃÜÂë
±¾µØ·ÃÎʵÄд³ÉÕâÑù£º
Data Source=(local);Initial Catalog=Êý¾Ý¿âÃû;UserID=Óû§Ãû;Password=ÃÜÂë
Èç¹ûÊDZ¾µØµÄ£¬Í¨¹ýwindows×é¼þÑéÖ¤µÄ£¨Ò²¾ÍÊÇûÓÐÓû§Ãû£¬ÃÜÂëµÄ£©Ð´³ÉÕâÑù£º
Data Source=(local);Initial Cata ......