C#Á¬½ÓACESSʱ£¬sqlÓï¾äÓдí
ÔÚдsqlÓï¾äʱ£¬Ò»°ã¶¼ÊÇÒ»¾ä½â¾ö£¬´ÓÀ´Ã»Ïë¹ý˵£¬°ÑsqlÓï¾ä²ð¿ªÀ´Ð´¡£
ÀýÈçÏÂÃæÕâ¾ä£º string readstring = "select * from ʵÀý where ʵÀýID='"+eid+"'";
È»ºóÖ´ÐÐ Myconnection();
DataSet ds = new DataSet();
OleDbDataAdapter da = new OleDbDataAdapter(readstring, Mycon);
Õâʱºò¾Í»á±¨´í¡£¡£²»ÊÇ˵“sqlÓï¾äÓд픣¬¾ÍÊÇ“Êý¾ÝÀàÐͲ»Æ¥Å䔣¬¸üÂé·³µÄÊÇ£¬ÔËÐгɹ¦ÁË£¬µ«ÊÇÔËÐеĽá¹ûÒ»Ö±ÓÐ´í¡£¡£
ºóÀ´£¬²Å·¢ÏÖÔÀ´Èç¹ûÁ¬½ÓµÄÊÇacessµÄ»°£¬ÒÔÉϵÄÕâ¾äsqlÊÇÒª±ä³ÉÏÂÃæÕâÑùдµÄ£º
string readstr = "select * from ʵÀý where ʵÀýID=";
string readstring = readstr + eid;
ÏñÏÂÃæÕâÑùµÄ´úÂ룬²ÅÄÜÔËÐÐÎÞÎó£º
int eid = Form1.int_selected + 1;
string readstr = "select * from ʵÀý where ʵÀýID=";
string readstring = readstr + eid;
Myconnection();//Á¬½ÓÊý¾Ý¿â
DataSet ds = new DataSet();
OleDbDataAdapter da = new OleDbDataAdapter(readstring, Mycon);
da.Fill(ds, "ʵÀý");
qbox1.Text = ds.Tables[0].Rows[0][3].ToString();
dxbox1.Text = ds.Tables[0].Rows[0][4].ToString();
Ïà¹ØÎĵµ£º
MS SQL Server 2008 ÔÚ½¨Íê±íºó£¬Èç¹ûÒª²åÈëÈÎÒâÁУ¬ÔòÌáʾ£º
µ±Óû§ÔÚÔÚSQL Server 2008ÆóÒµ¹ÜÀíÆ÷Öиü¸Ä±í½á¹¹Ê±£¬±ØÐëÒªÏÈɾ³ýÔÀ´µÄ±í£¬È»ºóÖØд´½¨ÐÂ±í£¬²ÅÄÜÍê³É±íµÄ¸ü¸Ä£¬Èç¹ûÇ¿Ðиü¸Ä»á³öÏÖÒÔÏÂÌáʾ£º²»ÔÊÐí±£´æ¸ü¸Ä¡£ÄúËù×öµÄ¸ü¸ÄÒªÇóɾ³ý²¢ÖØд´½¨ÒÔÏÂ±í¡£Äú¶ÔÎÞ·¨ÖØд´½¨µÄ±ê½øÐÐÁ˸ü¸Ä»òÕßÆôÓÃÁË“× ......
ÓÐЩ³£¼ûµÄÎÊÌâÔÚÂÛ̳Öв»¶Ï³öÏÖ£¬²»·ÁÕûÀíһϡ£
ÒÔÏÂÓï¾äÊÇÔÚSQLServer2005ÉÏʵÏֵģ¬Ò»Ð©Óï¾äÎÞ·¨ÔÚSS2000ÉÏÖ´ÐС£
ÓÐÓÃÖ¸ÊýÊÇÎÒ¸ù¾ÝÕâ¸öÎÊÌâµÄ³£¼û³Ì¶È´òµÄ·Ö£¬½ö¹©²Î¿¼¡£Êµ¼ÊÉÏ£¬µ±ÄãÓöµ½ÁËÕâ¸öÎÊÌ⣬Õâ¸öÎÊÌâÄÄÅÂÔÙÉÙ¼û£¬½â¾ö·½°¸Ò²ÊǷdz£ÓÐÓõġ£
1. Éú³ÉÈô¸ÉÐмǼ
ÓÐÓÃÖ¸Êý£º¡ï¡ï¡ï¡ï¡ï
³£¼ûµÄÎÊÌâÀàÐÍ£º¸ù ......
ÐÐÁÐת»»
create table test(id int,name varchar(20),quarter int,profile int)
insert into test values(1,'a',1,1000)
insert into test values(1,'a',2,2000)
insert into test values(1,'a',3,4000)
insert into test values(1,'a',4,5000)
insert into test values(2,'b',1,3000)
insert into test values(2, ......
What Is SQL?
SQL (pronounced as the letters S-Q-L or as sequel) is an abbreviation for Structured Query Language. SQL is a language designed specifically for communicating with databases.
Unlike other languages (spoken languages like English, or programming languages like Java or Visual Basic), SQ ......
Æô¶¯ MS SQL SERVER £¨2000 £2008¶¼ÊÊÓã©£º
cmd>net start mssqlserver
Æô¶¯ ·ÇȱʡʵÀý£º
cmd>net start mssql$[instance name]
×¢£ºÃüÁîÐÐÐèÒªÓÐAdministratorȨÏÞ¡£
Í£Ö¹SQLSERVER ·þÎñÆ÷:
cmd>net stop mssqlserver
cmd>net stop mssql$[instance name] ......