SQL Server³£ÓÃÊý¾Ý¿âÁ¬½Ó×Ö·û´®
Ò»¡¢Ê¹ÓÃSqlConnection¶ÔÏóÁ¬½ÓSQL ServerÊý¾Ý¿â
1¡¢µÇ¼Êý¾Ý¿âµÄ·½Ê½ÎªSQL ServerÑé֤ģʽ
server=·þÎñÆ÷Ãû;database=Êý¾Ý¿âÃû³Æ;uid=Óû§;pwd=ÃÜÂë
2¡¢µÇ¼Êý¾Ý¿âµÄ·½Ê½ÎªWindowsÑé֤ģʽ
server=·þÎñÆ÷Ãû;database=Êý¾Ý¿âÃû³Æ;Integrated Security=SSPI
ÆäÖУ¬Integrated Security¼´Trusted_Connection,È¡ÖµÓÐfalse(¼´no)¡¢true(¼´yes»òSSPI)
ÆäËû˵Ã÷£ºÔÚÁ¬½Ó±¾»úʱ£¬·þÎñÆ÷Ãû¿ÉÒÔÊÇlocalhost»òÕß(local)»òÕß.
×¢Ò⣬Èç¹ûʹÓõÄSQL ServerÊÇEXPRESS£¨¼òÒ×°æ/ѧϰ°æ£©£¬Ôò±ØÐëÔÚ·þÎñÆ÷Ãûºó¼Ó\SQLEXPRESS
¶þ¡¢Ê¹ÓÃOleDbConnection¶ÔÏóÁ¬½ÓOLE DBÊý¾ÝÔ´
1¡¢Á¬½ÓACCESSÊý¾Ý¿â
provider=Microsoft.Jet.OLEDB.4.0;Data Source=AccessÎļþ·¾¶
2¡¢Á¬½ÓSQL ServerÊý¾Ý¿â
provider=SQLOLEDB;Data Source=·þÎñÆ÷Ãû;Initial Catalog=Êý¾Ý¿âÃû;uid=Óû§;pwd=ÃÜÂë
Èý¡¢Ê¹ÓÃOdbcConnection¶ÔÏóÁ¬½ÓODBCÊý¾ÝÔ´
Driver=Êý¾Ý¿âÌṩ³ÌÐòÃû;Server=·þÎñÆ÷Ãû;Trusted_Connection=yes;Database=Êý¾Ý¿âÃû
ËÄ¡¢Ê¹ÓÃOracleConnection¶ÔÏóÁ¬½ÓOracleÊý¾Ý¿â
Data Source=Oracle8i;Integrated Security=yes
Ïà¹ØÎĵµ£º
c06 --------------7545623Ìõ
c05---------------1032652Ìõ
vc01--------------427741Ìõ
SQL Statement from editor:
select c0602 "ÉÌÆ·±àÂë",c0625 "ÉÌÆ·ÌõÂë",
c0103 "ÉÌÆ·Ãû³Æ",c0104 "¹æ¸ñ",c060 ......
´ó¼Ò´ò¿ªÕâ¸öÁ´½Ó¿ÉÒÔ¿´µ½ºÜ¶àÊý¾Ý¿âµÄÁ¬½Ó·½·¨¡£http://www.connectionstrings.com
ÕâЩÊý¾Ý¿âÖ®¼äµÄÊý¾Ý½»»»¾ÍÊÇÕâ¸öÌù×ÓËùÒª×ܽáµÄÄÚÈÝ¡£
£¨Ò»£©SQL ServerÖ®¼ä
°ÑÔ¶³ÌÊý¾Ý¿âÖеÄÊý¾Ýµ¼Èëµ½±¾µØÊý¾Ý¿â¡£
http://community.csdn.net/Expert/topic/5079/5079649.xml?temp=.7512018
http://community.csdn.net/Expert/ ......
±È½ÏÁ½¸öSQLµÄÖ´ÐÐʱ¼ä
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PROC_SQL_COMP]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[PROC_SQL_COMP]
GO
/*--²âÊÔÁ½×éSQLµÄƽ¾ùʱ¼ä
ÀûÓÃosql.exeÀ´²âÊÔÁ½×é SQL Óï¾äµÄÖ´ÐÐʱ¼ä
²âÊԵĴ洢¹ý³ ......