Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

.NET »ñÈ¡¾ÖÓòÍøµÄsql server Áбí

SqlDataSourceEnumerator instance =SqlDataSourceEnumerator.Instance;
System.Data.DataTable table = instance.GetDataSources();
»ò
System.Data.Sql.SqlDataSourceEnumerator.Instance.GetDataSources();
·µ»ØDatatable
´Ëtable°üº¬ÒÔÏÂËĸö×Ö¶Î
Console.WriteLine("·þÎñÆ÷Ãû = {0}", row["ServerName"]);
Console.WriteLine("ʵÀýÃû = {0}", row["InstanceName"]);
Console.WriteLine("ÊÇ·ñ¼¯³ÉÑéÖ¤ = {0}", row["IsClustered"]);//¼´WindowsÉí·ÝÑéÖ¤ºÍSQL ServerÑéÖ¤
Console.WriteLine("°æ±¾ = {0}", row["Version"]);//8.*ÊÇSQL 2000,9.*ÊÇSQL 2005
·½·¨Ò»£ºÍ¨¹ýMicrosoft.SQLDMO.Object×é¼þ¾Í¿ÉÒÔÇáËÉÍê³É´ËÏ×÷£º
Ê×ÏÈÈçºÎÕÒµ½Microsoft.SQLDMO.Object
1.ÈçºÎÔÚÄúµÃÏîÄ¿ÖÐÄܹ»Ê¹ÓÃSQLDMO×é¼þ£¿
²Ëµ¥£­ÏîÄ¿£­Ìí¼ÓÒýÓã­COM-Microsoft.SQLDMO.Object
2.½«¸Ã¹¦ÄÜд³ÉÒ»¸öÀࣺ
using System;
using System.Collections;
using System.Collections.Specialized;
namespace JillZhang
{
    /**//// <summary>
    /// Summary description for SqlInfo.
    /// </summary>
    public class SqlInfo
    {
        ³ÉÔ±±äÁ¿#region ³ÉÔ±±äÁ¿
        private string _uid="";
        private string _pwd="";
        private StringCollection _serverList=new StringCollection();
        private Hashtable _databaseList=new Hashtable();
        #endregion
        ¹¹Ô캯Êý#region ¹¹Ô캯Êý
        public SqlInfo()
        {
            this._serverList=GetSqlInstances();   
   &nb


Ïà¹ØÎĵµ£º

SQL ServerÖи÷¸öϵͳ±íµÄ×÷ÓÃ

 
sysaltfiles            Ö÷Êý¾Ý¿â              ±£´æÊý¾Ý¿âµÄÎļþ
syscharsets        Ö÷Êý¾Ý¿â        &nb ......

OracleÖ´ÐÐSQLÓï¾äµÄ¹ý³Ì

µ±ÎÒÃÇÌá½»Ò»ÌõsqlÓï¾äʱ£¬oracle»á×öÄÄЩ²Ù×÷ÄØ£¿
Oracle»áΪÿ¸öÓû§½ø³Ì·ÖÅäÒ»¸ö·þÎñÆ÷½ø³Ì£ºservice process£¨Êµ¼ÊÇé¿öÓ¦¸ÃÇø·ÖרÓ÷þÎñÆ÷ºÍ¹²Ïí·þÎñÆ÷£©£¬µ±service process½ÓÊÕµ½Óû§½ø³ÌÌá½»µÄsqlÓï¾äʱ£¬·þÎñÆ÷½ø³Ì»á¶ÔsqlÓï¾ä½øÐÐÓï·¨ºÍ´Ê·¨·ÖÎö¡£
Ãû´Ê½âÊÍ£º
Óï·¨·ÖÎö£ºÓï¾ä±¾ÉíÕýÈ·ÐÔ¡£
´Ê·¨·ÖÎö£º¶ÔÕÕÊ ......

.netÁ¬½Ósql server

Êý¾Ý¿âÃû£ºEmployee
±íÃû£ºEmployees
uid£ºsa
pwd£ºsa
ÎÊÌâ²¹³ä£º
×îºÃÊÇÌṩSQL SERVER½Ó¿Ú·ÃÎÊÊý¾Ý¿âµÄ´úÂë
Õâ¶Î´úÂëÊÇVS.NET×Ô¶¯Éú³É£¬ÀïÃæÓÐÄÄЩÊDz»ÐèÒªµÄÄØ£¿Ó¦¸Ã°ÑÊý¾Ý¿âÁ¬½ÓµÄ´úÂë·ÅÔÚÄĸöµØ·½ÄØ£¿
<%@ Page language="c#" Codebehind="WebForm3.aspx.cs" AutoEventWireup="false" Inherits="WebApplica ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ