C#ºÍÊý¾Ý¿âSQL - MS-SQL Server / »ù´¡Àà
ÎÒÃÇC#×öÒ»¸ö´°Ìå ÍùÊý¾Ý¿âÀï²åÈëÊý¾Ý
SqlConnection cn = new SqlConnection("Data Source=20090713-1752\\SQLEXPRESS;Initial Catalog=goods;Integrated Security=True");
cn.Open();
SqlDataAdapter da = new SqlDataAdapter("insert into goods values('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "')", cn);
DataSet ds=new DataSet ();
da.Fill(ds, "goods");
MessageBox.Show("OK");
cn.Close();
Ö»ÓÐÒ»¸ö±í id name num£¨ÊýÁ¿£©¡£¡£¡£¡£ÏÖÔÚÿ²åÈëÒ»ÐоÍÏÔʾһÐУ¬£¬£¬£¬¼ÙÈôÎÒÏȲåÈë1 ÂøÍ· 20£¬ È»ºóÔÙ²åÈë 1 ÂøÍ· 11 £¬ ÈçºÎÈÃʹÆäÏÔʾһÐÐ 1 ÂøÍ· 31 °¡
²»Ã÷°×£¡
s
ÕâÑùµÄ»°,ÓÃÂ¥Ö÷µÄ±àÂ뷽ʽֱ½ÓÏÔʾ½á¹ûµÄ»°,ÓеãÀ§ÄÑ.Ó¦µ±°É²åÈëºÍÏÔʾ·Ö2¸ö²¿·Ö.²åÈëÊÇÒ»ÌõÒ»ÌõµÄ²åÈë,µ«ÊÇÏÔʾµÄ»°,ÐèÒªÁíÒ»¸ö·½·¨.
SqlConnection cn = new SqlConnection("Data Source=20090713-1752\\SQLEXPRESS;Initial Catalog=goods;Integrated Security=True");
cn.Open();
SqlDataAdapter da = new SqlDataAdapter("insert into goods values('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "')\n select id, [name], sum([sum]) as [sum]", cn);
DataSet ds=new DataSet ();
Ïà¹ØÎÊ´ð£º
ÎÒÒª×öÒ»¸ö¶¨µãʼþ£¬ÊÇÿÌìÍíÉÏ12µã¾Í°ÑÈý¸ö±íÀïµÄÐÅÏ¢·ÅÈëÒ»¸ö±íÀÎÒÏëÓô洢¹ý³ÌÀ´Ð´£¬ÔõôдÄØ£¿£¬ÄÇλ¸ßÊÖ°ï°ïæ°É£¬·Ç³£¸Ðл£¡
Óû§ÃûÊÇΨһµÄ
±íA ×Ö¶Î
Óû§Ãû£ºName ,ÓÊÏ䣺Ema ......
21cnµÄÓÊÏ䣬ÔÚoutlookÅäÖúó¿ÉÒÔÕý³£ÊÕ·¢Óʼþ£¬¿ÉÊÇÎÒдÔÚC#ÖоͲ»ÐУ¬»»³ÉÆäËüÓÊÏ䣬163ºÜÔç×¢²áµÄ¡£¿ÉÒÔ·¢ËÍ¡£²éÁ˺ܾã¬Ã»ÓÐÕÒµ½ÔÒò£¬Çë¸ßÊÖ°ïæ½â´ð¡£¡£¡£Ð¡µÜ£¬Ð»ÁË¡£¡£´úÂëÈçÏ£º
private void SendMail ......
<table style="width: 1000px"><tr>
<td style="height: 38px; width: 35px;">
ÐÕÃû</td>
......
protected void btnLogin_Click(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection("Server = (local);user id = sa;pwd = 1;database = Login");
&nb ......
СµÜ£¬×î½üҪתÐÐÈ¥×öoracle¿ª·¢ÁË£¬ÓÉÓÚ´óѧ±Ïҵʱ£¬×ßÁ˸öÍä·£¬ÏÖÔÚºÜСÐÄ£¬ÎÊÏ£¬×öPL/SQLÓÐûÓÐǰ;£¿£¿£¿
µ±È»ÎÒ˵µÄÕâ¸öǰ;ÊÇÖ¸ ÒÔºóÒªÌø²Û£¬Êг¡¶ÔÕâÑùµÄÈ˲ŵÄÐèÇóÁ¿´ó²»´ó£¿£¿
3q ÄÇ¿´À´»¹Ö»ÄÜÏȽӴ ......