C#ÏîÄ¿´ò°üÒÔ¼°×Ô¶¯°²×°SQL SeverÊý¾Ý¿â
±¾ÎĽ«½éÉÜC#ÏîÄ¿´ò°üÒÔ¼°×Ô¶¯°²×°SQL SeverÊý¾Ý¿â£¬°üÀ¨´´½¨²¿ÊðÏîÄ¿¡¢½«Ö÷³ÌÐòÏîÄ¿µÄÊä³öÌí¼Óµ½²¿ÊðÏîÄ¿ÖС¢´´½¨°²×°³ÌÐòÀà¡¢´´½¨×Ô¶¨Òå°²×°¶Ô»°¿òµÈµÈ¡£
’power by: landlordh
’for 2000,xp,2003
Module uninstall
Sub Main()
Dim myProcess As Process = New Process
If System.Environment.OSVersion.ToString.IndexOf("NT 5") Then
myProcess.Start("msiexec", "/X{2B65D4A9-C146-4808-AB4B-321FB0779559}") ’¸ÄΪ×Ô¼ºµÄProductCode
End If
myProcess.Close()
End Sub
End Module
ÔÚC#ÏîÄ¿ÖнøÐдò°ü£¬Ê×ÏÈÐèÒª½â¾öµÄÊÇÏîÄ¿µÄ½¨Á¢£¬Æä´ÎÊÇËùÐ貿ÊðµÄÏîÄ¿£¬ÒªÌرð×¢Òâ²ÎÊýµÄÉèÖá£51CTOÍƼö¡¶C#ʵÓûù´¡½Ì³Ì¡·
C#ÏîÄ¿´ò°üÒ»).´´½¨²¿ÊðÏîÄ¿
1. ÔÚ“Îļþ”²Ëµ¥ÉÏÖ¸Ïò“Ìí¼ÓÏîÄ¿”£¬È»ºóÑ¡Ôñ“н¨ÏîÄ¿”¡£
2. ÔÚ“Ìí¼ÓÐÂÏîÄ¿”¶Ô»°¿òÖУ¬Ñ¡Ôñ“ÏîÄ¿ÀàÐÍ”´°¸ñÖеē°²×°ºÍ²¿ÊðÏîÄ¿”£¬È»ºóÑ¡Ôñ“Ä£°å”´°¸ñÖеē°²×°ÏîÄ¿”¡£ÔÚ“Ãû³Æ”¿òÖмüÈë setup1¡£
3. µ¥»÷“È·¶¨”¹Ø±Õ¶Ô»°¿ò¡£
4. ÏîÄ¿±»Ìí¼Óµ½½â¾ö·½°¸×ÊÔ´¹ÜÀíÆ÷ÖУ¬²¢ÇÒÎļþϵͳ±à¼Æ÷´ò¿ª¡£
5. ÔÚ“ÊôÐÔ”´°¿ÚÖУ¬Ñ¡Ôñ ProductName ÊôÐÔ£¬²¢¼üÈë ÐÅÏ¢¹ÜÀíϵͳ ¡£
C#ÏîÄ¿´ò°ü¶þ).½« Ö÷³ÌÐò ÏîÄ¿µÄÊä³öÌí¼Óµ½²¿ÊðÏîÄ¿ÖÐ
1. ÔÚ“Îļþϵͳ±à¼Æ÷”ÖУ¬Ñ¡Ôñ“Ó¦ÓóÌÐòÎļþ¼Ð”¡£ÔÚ“²Ù×÷”²Ëµ¥ÉÏ£¬Ö¸Ïò“Ìí¼Ó”£¬È»ºóÑ¡Ôñ“ÏîÄ¿Êä³ö”¡£
2. ÔÚ“Ìí¼ÓÏîÄ¿Êä³ö×锶Ի°¿òÖУ¬Ñ¡Ôñ“ÏîÄ¿”ÏÂÀÁбíÖеēÄãµÄ³ÌÐò”¡£
3. µ¥»÷“È·¶¨”¹Ø±Õ¶Ô»°¿ò¡£
4. ´ÓÁбíÖÐÑ¡Ôñ“Ö÷Êä³ö”ºÍ“ÄÚÈÝÎļþ”×飬Ȼºóµ¥»÷“È·¶¨”¡£
C#ÏîÄ¿´ò°üÈý).´´½¨°²×°³ÌÐòÀà
1. ÔÚ&ldq
Ïà¹ØÎĵµ£º
Ëù²âÊÔ»·¾³Îª£ºMs sqlserver 2008£¬visual studio 2008
²âÊÔÊý¾ÝΪ10ÍòÌõ
Linq·½Ê½ ´úÂ룺
/// <summary>
/// Linq ·½Ê½
/// </summary>
public static void Linq_insert()
{
DataClassesDataContext dataContext = new DataClassesDataContext();
......
sqldataadapterÊʺÏÓÃÔÚ²éѯ½Ï¶à×Ö¶Îʱ.....
string sou = "select * from art where content like '%" + TextBox1.Text + "%'";
SqlDataAdapter da = new SqlDataAdapter(sou, conn);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables[0].rows.count==0)
{
Response.Write("ûÓмǼ£¡");
}
else
{
......
if exists(select * from sysobjects where name='atzk')--ÅжÏÊÇ·ñ´æÔڴ˱í
drop table atzk
go
create table atzk
(
nid int identity(1,1) primary key,--nid×Ô¶¯±àºÅ£¬²¢ÉèΪÖ÷¼ü¡£
mytitle varchar(50) not null,--֪ͨµÄ±êÌâ¡£
mycontents varchar(200)--·¢²¼Í¨ÖªµÄÄÚÈÝ¡£
) ......
Èç¹ûÄãµÄÊý¾Ý¿âÔËÐÐÔÚÍêÕû»òÊÇÅúÁ¿ÈÕÖ¾»Ö¸´Ä£Ê½Ï£¬ÄÇôÄã¾ÍÐèҪʹÓÃ×÷Òµ(job)À´¶¨ÆÚ±¸·ÝÊÂÎñÈÕÖ¾£¬±£³ÖÄãµÄÊÂÎñÎļþ´óС´¦ÔÚÒ»¸ö¿É¹ÜÀíµÄ·¶Î§¡£µ±ÄãÐèÒª»¹ÔÊÂÎñÈÕ־ʱ£¬Äã¾ÍÐèÒª°´ÕÕ´´½¨ÊÂÎñÈÕÖ¾µÄ˳ÐòÀ´»Ö¸´ËüÃÇ¡£Äã¿ÉÒԲο¼´æÔÚmsdb..backupset±íÖеÄÐÅÏ¢À´È·¶¨»¹ÔÎļþµÄ˳Ðò£¬Ê¹ÓÃFirstLSNºÍLastLSNÁеÄÖµ×÷²Î¿¼¡£µ±Ä ......
SQLÓï·¨ÓëÃüÁî
SELECT Óï¾ä
SELECT[predicate]{*|table.*|[table.]field [,[table.]field2[,...]]} [AS alias1
[,alias2[,...]]]
from tableexpression [,...][IN externaldatabase]
[WHERE...]
[GROUP BY...]
[HAVING...]
[ORDER BY...]
[WITH OWNERACCESS OPTION]
SELECT Óï¾ä°üÀ¨ÏÂÃ漸¸ö²¿·Ö
predicate
......