ÊÖ°ÑÊÖ½ÌÄã×öASP.NETÁôÑÔ±¾
ûÓÐÏëµ½ÕæµÄÕâô·½±ã!¸ü¼Ó¼á¶¨ÎÒѧϰASP.NETµÄ¾öÐÄ! ÏÖÔÚÎÒÃÇÒ»ÆðÀ´¿´¿´°É
1,ÇëÈ·¶¨ÄãµÄµçÄÔ°²×°ÁËÒÔϵÄÈí¼þ£¡
1.1£¬ WINDWOS 2000ÒÔÉÏ°æ±¾(±Ø×°)
1.2£¬ .NET Framework(±Ø×°)
1.3£¬ Visual Studio .NET 2005(±Ø×°)
2,½¨Á¢Ò»¸öACCESSÊý¾Ý¿â,
3,Í϶¯VS2005 µÄGRIDVIEW µ½Éè¼ÆÒ³Ãæ
4.¸ÄÔ´´úÂë
4.1 ÔÚASPX´úÂëÎļþµÄÍ·²¿£¬Ìí¼Ó²Ù×÷Êý¾Ý¿âÒªÓõ½µÄÃüÃû¿Õ¼ä£º
using System.Data.OleDb;
4.2 ÔÚaspxµÄ[Éè¼Æ]ÊÓͼÖУ¬ÉùÃ÷³ÉÔ±myConnection£º
[¸´ÖƵ½¼ôÌù°å]
CODE:
protected OleDbConnection myConnection=new OleDbConnection ();
4.3 µÚÒ»²½£¬½øÐÐÊý¾Ý¿âµÄÁ´½Ó
[¸´ÖƵ½¼ôÌù°å]
CODE:
string strConn= "Provider=Microsoft.Jet.OLEDB.4.0;"+"Data Source="+Server.MapPath("SOCUT.mdb");
OleDbConnection myConnection=new OleDbConnection ();
myConnection.ConnectionString =strConn;
µÚ¶þ²½£¬Ö´ÐÐSQLÖ¸Áѡ³ö¼Ç¼¼¯ºÏ
[¸´ÖƵ½¼ôÌù°å]
CODE:
string strCommand="Select * from Socut_Guest ORDER BY time DESC";
OleDbDataAdapter da=new OleDbDataAdapter(strCommand,myConnection);
DataSet ds=new DataSet();
da.Fill(ds,"scores");
µÚÈý²½£¬½«Êý¾Ý¼¯ºÏͬDataGrid½áºÏÔÚÒ»Æð
[¸´ÖƵ½¼ôÌù°å]
CODE:
GridView1.DataSource=ds.Tables["scores"].DefaultView ;
GridView1.DataBind ();
5. ÏÖÔÚä¯ÀÀÒ»ÏÂÕâ¸öÎļþ¿´¿´,ÊDz»ÊÇ¿ÉÒÔ¶Á³öÊý¾Ý¿âµÄÄÚÈÝÁË.? µ±È». ¹þ¹þ Ì«¼òµ¥ÁË.
6. ʵÏÖÁôÑÔ¹¦ÄÜ
6.1 н¨Ò»¸öÎļþ ¼ÓÈë4.1 & 4.2µÄ´úÂëÔÚÎļþÏàÓ¦µÄλÖÃ!
6.2Ë«»÷“ÁôÑÔ”°´Å¥£¡
Ìí¼ÓÒÔϲåÈëÊý¾ÝʱÐèÒªµ÷ÓõĴúÂë
[¸´ÖƵ½¼ôÌù°å]
CODE:
String SQL,ConnStr;
ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+"Data Source="+Server.MapPath("SOCUT.mdb");
SQL = "Insert I
Ïà¹ØÎĵµ£º
41.¹¹ÔìÆ÷constructorÊÇ·ñ¿É±»override?
´ð£º¹¹ÔìÆ÷constructor²»Äܱ»¼Ì³Ð£¬Òò´Ë²»ÄÜÖØдoverriding£¬µ«¿ÉÒÔ±»ÖØÔØoverloading¡£
42.ÊÇ·ñ¿ÉÒԼ̳ÐstringÀà?
´ð£ºstringÀàÊÇfinalÀà¹Ê²»¿ÉÒԼ̳С£ &n ......
----´´½¨Ò»¸öÖ»ÓÐÊäÈë²ÎÊýµÄ´æ´¢¹ý³Ì
create procedure proc_user
@name varchar(20),
@Password varchar(100)
as
select * from loginuser
where name like @name
---´´½¨Ò»¸öÓÐÊäÈëºÍÊä³ö²ÎÊýµÄ´æ´¢¹ý³Ì
create procedure proc_usertext
@name varchar(20),
@blog varchar(100) output
as
select @blog = ......
ËäȻ˵ASP.NETÊôÓÚ°²È«ÐԸߵĽű¾ÓïÑÔ,µ«ÊÇÒ²¾³£¿´µ½ASP.NETÍøÕ¾ÓÉÓÚ¹ýÂ˲»ÑÏÔì³É×¢Éä.ÓÉÓÚASP.NET»ù±¾ÉÏÅäºÏMMSQLÊý¾Ý¿â¼ÜÉè Èç¹ûȨÏÞ¹ý´óµÄ»°ºÜÈÝÒ×±»¹¥»÷. ÔÙÕßÔÚÍøÂçÉÏÕÒ²»µ½ºÃµÄASP.NET·À×¢Éä½Å±¾,ËùÒÔ¾Í×Ô¼ºÐ´Á˸ö. ÔÚÕâÀï¹²Ïí³öÀ´Ö¼ÔÚÈóÌÐòÔ±Ãâ³ýSQL×¢ÈëµÄÀ§ÈÅ.
ÎÒдÁËÁ½¸ö°æ±¾,VB.NETºÍC#°æ±¾·½±ã²»Í¬³ÌÐò¼äʹÓà ......
Stephen Walther
Superexpert
ÊÊÓÃÓÚ£º
Microsoft ASP.NET 2.0
Microsoft Visual Studio 2005
¼ò½é
ÔÚ Microsoft ASP.NET 2.0 Framework ÖУ¬Êý¾Ý¿â·ÃÎʵõ½Á˼«´óµÄ¼ò»¯¡£ÀûÓÃÈ«Ð嵀 SqlDataSource ¿Ø¼þ£¬ÄúÎÞÐè±àдһÐдúÂë¾Í¿ÉÒÔÑ¡Ôñ¡¢¸üС¢²åÈëºÍɾ³ýÊý¾Ý¿âÊý¾Ý¡£
Éú³É¼òµ¥µÄÓ¦ÓóÌÐòʱ£¬SqlDataSource ¿ ......