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

SQL »ù±¾²Ù×÷ ɾ³ý ÐÞ¸Ä Ë¢Ð Ð޸İæ

C# Êý¾Ý¿âÖ®ÂÃ……
¼ÌÐø½ø¹¥²ã³ö²»ÇîµÄproblems
ÔÚÉÏһƪÄÚÈݵĻù´¡ÉÏ£¬ÎÒÓÖ×÷ÒԸĽø£¬ÏÖÔÚµÄÇé¿öÊÇÕâÑùµÄ£º
 //In Browseuser form
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Configuration;
using System.Data.SqlClient;
namespace Str
{
public partial class Browseuser : Form
{
public Browseuser()
{
InitializeComponent();
}

//define Êý¾Ý¼¯¶ÔÏódsÓÃÓÚ±£´æ²éѯ·µ»ØµÄ½á¹û¼¯
DataSet ds;
private void Browseuser_Load(object sender, EventArgs e)
{
string strConnection = ConfigurationSettings.AppSettings["connectionstring"];
SqlConnection objConnection = new SqlConnection(strConnection);
objConnection.Open();
string sql = "select userid as userid,name as name from judging";
SqlDataAdapter adp = new SqlDataAdapter(sql, objConnection);
ds = new DataSet();
ds.Clear();
adp.Fill(ds, "judging");
dataGridView1.DataSource=ds. Tables[0].DefaultView;
dataGridView1.Refresh();
this.judgingTableAdapter.Fill(this.masterDataSet.judging);
}
/**********************************************************************************************/
/*ÖÁ´ËÍê³ÉÁ˽«Êý¾Ý¿âjudgingÖеÄÄÚÈÝÈ«²¿ÏÔʾÔÚÐÂform——BrowseuserÉÏ*/
/**********************************************************************************************/
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
private void button3_Click(object sender, EventArgs e)
{
this.Close();
}
//define a delegate instance in order to refresh
delegate void UseF();
/****************


Ïà¹ØÎĵµ£º

asp.net(C#)ʵÏÖSQL2000Êý¾Ý¿â±¸·ÝºÍ»¹Ô­

asp.net(C#)ʵÏÖSQL2000Êý¾Ý¿â±¸·ÝºÍ»¹Ô­
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.Htm ......

sqlµÝ¹é²éѯ

ÔÚ¹¤×÷ÖÐÓöµ½Ò»¸öÎÊÌâ,ÊÇÐèÒªsqlµÝ¹é²éѯµÄ.²»¶®,ÓÚÊǵ½csdnÉÏÈ¥ÎÊ,ÄÇÀïµÄЧÂÊÕæÊǷdz£¸ß,ÎÒÒÔǰҲûÔÚÉÏÃæÎʹýÎÊÌâ.
ÎÊÌâÃèÊö:
ÎÒÓÐÒ»¸ö±í½á¹¹ÈçÏÂ:
id upperid
1     2
3     2
4     1
5     3
¾ßÌå²ã´Î²»ÖªµÀ,ÎÒÏëÓõݹésqlÓ ......

C#ÓëSQL Server 2000ʵÏÖÎÞÏÞ¼¶²Ëµ¥


//tree.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Syst ......

²éѯ´æ´¢¹ý³ÌµÄ²ÎÊýÐÅÏ¢µÄSQLÓï¾ä

declare @SchemaName nvarchar(50)
set @SchemaName='dbo'
declare @CommandName nvarchar(50)
set @CommandName='spName'
SELECT
                DB_NAME() AS [PROCEDURE_CATALOG],
         ......

SQL 2000ºÍSQL 2005·þÎñ¶Ë¿Ú²é¿´»òÐÞ¸Ä

1¡¢ SQL Server£ºÈëÕ¾¶Ë¿ÚΪTCP 1433£¬³öÕ¾¶Ë¿ÚΪTCPÈÎÒâ¶Ë¿Ú£¨1024¡«5000Ö®¼äµÄ¶Ë¿ÚºÅ£©£»
2¡¢ SQL Browser £ºÈëÕ¾¶Ë¿ÚΪUDP 1434£¬³öÕ¾¶Ë¿ÚΪUDPÈÎÒâ¶Ë¿Ú£¨1024¡«5000Ö®¼äµÄ¶Ë¿ÚºÅ£©£»
3¡¢²é¿´»òÐÞ¸ÄSQL2005ʵÀýµÄ¶Ë¿ÚºÅ£¬Èç¹ûϵͳÖÐͬʱ°²×°SQL 2000ºÍSQL 2005£¬SQL 2005µÄÁ¬½Ó¶Ë¿Ú¿ÉÄܲ»ÊÇ1433£¬ÎÒÃÇÐèÒª¸ü¸ÄSQL 2005 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ