C# code:
string strCmd = "SELECT Top 0 * from tabAreaStationData";
SqlDataAdapter sqlAdapter = new SqlDataAdapter(strCmd, sqlCn);
DataTable dt = new DataTable();
sqlAdapter.Fill(dt);
//Ê¡ÂÔµÄÕⲿ·Ö´úÂ룬ÊÇÌî³ädt±íµÄ
......
ÎÒҪʵÏÖÒ»¸öÓʼþÑéÖ¤Óû§µÄ¹¦ÄÜ£¬ÔÚ·¢Ë͵ÄÓʼþÄÚÈÝÖÐÐèÒªÌí¼ÓÒ»¸öÁ´½Ó£¬µ«ÊÇÈçºÎÌí¼ÓÕâ¸öÁ´½ÓÄØ£¿´úÂëÈçÏ£ºMailMessage message = new MailMessage(from, to);
message.Subject = "·¢ËÍ´øÁ´½ÓµÄʾÀý";
message.SubjectEncoding = System.Text.Encoding.UTF8;
message.Body = "<a href=\"www.ba ......
ÎҵĵçÄÔ´´½¨¶àÁËÒ»¸öÓû§×÷Ϊ¹ÜÀíÔ±£¬µÇ½Õâ¸öÓû§ºó£¬ÔÚ´ò¿ªSQLʱ£¬Ö®Ç°´´½¨µÄÊý¾Ý¿â²»¼ûÁË£¬µ«Ö®Ç°µÄÏîÄ¿È´¿ÉÒÔÔËÐУ¬ÏëÔÙ¸½¼Ó֮ǰÒѾ¸½¼ÓÔÚSQLµÄÊý¾Ý¿âʱ£¬È´Ìáʾ£ºÎÞ·¨Îª´ËÇëÇóÊý¾Ý¼ìË÷£¨ÁíÒ»½ø³ÌÕýÔÚʹÓôËÎļþ£¬½ø³ÌÎÞ·¨·ÃÎÊ£©
¸ãµ½ÏÖÔÚÓôÃÆËÀÁË£¬Ïë¶ÔÊý¾Ý¿â¸ü¸Ä¶¼²»ÖªµÀÈ¥ÄÄÀï¸Ä¡£
´ó¼Ò°ï°ïÊÖ棡£¡£¡
ûÓöµ½¹ý ......
ÀýÈçÎÒÏÖÔÚÔÚÊý¾Ý¿âÖÐÓÐÕâô¼¸ÌõÊý¾Ý:ѧºÅ,ÐÕÃû,°à¼¶,°àÖ÷ÈÎID,³öÉúÈÕÆÚ
ÎÒÔÚ²éѯѧÉúÐÅÏ¢½çÃæÖÐÒªÇó¿ÉÒÔ¸ù¾ÝÒÔÉÏ5ÌõÊý¾ÝÖеÄÈÎÒâÒ»Ïî»ò¶àÏî²éѯ³öÊý¾Ý
ÎÒ×Ô¼ºÐ´µÄsqlÓï¾äÆ´½ÓÈçÏÂ:
C# code:
string strsql = "select * from stu where ";
if (stuNum != "")
......
ÓÐ10WÌõÊý¾Ý£¬ÒªÈ¡³ö90000µ½900010Ö®¼ä µÄ10Ìõ¼Ç¼
ЧÂÊ×î¿ìµÄÓï¾äÔõôд£¿£¿
select top 10 * from tab where id>=90000 and id<900011
IDÊÇÖ÷¼ü,ËٶȲ»»áÂý ·ñÔò,Ôõôд¶¼ÊÇÂý
select top ÿҳÏÔʾµÄ¼Ç¼Êý * from topic where id not in
(select top £¨µ±Ç°µÄÒ³Êý-1£©×ÿҳÏÔʾµÄ¼ÇÂ¼Ê ......
±¾ÈË×î½üÓõ½NOTIFICATION ¿Ø¼þ £¬Éæ¼°µ½HTMLÓëC#±äÁ¿´«µÝ ¡£¡£¾ßÌåÎÊÌâÈçÏ£»
string ReceiveMessage ="sbsb";
notify.Text = "<html><body><p>" + ReceiveMessage + "<p/><p align=right><input type=button name=OK value='»Ø¸´'> &l ......