¡ïAsp.netÁ¬½ÓAccessÊý¾Ý¿âÀý³Ì¡ï
´ó¼ÒºÃ,ÒÔÏÂÊÇÓйØASP.netÁ¬½ÓAccessÊý¾Ý¿âµÄÀý³Ì£¬
ÔÚÕâÀïºÍ´ó¼Ò·ÖÏíһϣº
Asp.netÁ¬½ÓAccessÊý¾Ý¿âÀý³ÌÏê½â:
<%@ Import Namespace="System.Data" %>
<%@ Import NameSpace="System.Data.OleDb" %>
<script laguage="VB" runat="server">
Dim myConnection As OleDbConnection
Dim myCommand As OleDbCommand
sub page_load(sender as Object,e as EventArgs)
'1.Á¬½ÓÊý¾Ý¿â
dim dbname as string
dbname=server.mappath("authors.mdb")
myConnection = New OleDbConnection( "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source="&dbname )
myConnection.Open()
la1.text="Connection Opened!"
'2.Ìí¼Ó¼Ç¼
myCommand = New OleDbCommand( "Insert INTO Authors(Authors,country) Values('Simson','usa')", myConnection )
myCommand.ExecuteNonQuery()
la2.text="New Record Inserted!"
'3 ¸üÐÂÊý¾Ý(Access)
myCommand = New OleDbCommand( "UPDATE Authors SET Authors='Bennett' WHERE Authors = 'Simson'", myConnection )
myCommand.ExecuteNonQuery()
la3.text="Record Updated!"
'4 ɾ³ýÊý¾Ý£¨access£©
myCommand = New OleDbCommand( "DELETE FROM Authors WHERE Authors = 'David'", myConnection )
myCommand.ExecuteNonQuery()
la4.text="Record Deleted!"
'5 ʹÓÃDateGridÏÔʾÊý¾Ý
myCommand = New OleDbCommand( "select * FROM Authors", myConnection )
MyDataGrid.DataSource=myCommand.Executereader()
MyDataGrid.DataBind()
end sub
</script>
<html>
<body>
<asp:label id="la1" runat="server" /><br>
<asp:label id="la2" runat="server" /><br>
<asp:label id="la3" runat="server" /><br>
<asp:label id="la4" runat="server" /><br>
<ASPataGrid id="MyDataGrid" runat="server"
BorderColor="black"
BorderWidth="1"
GridLines="Both"
CellPadding="3"
CellSpacing="0"
Font-Name="Verdana"
Font-Size="10pt"
HeaderStyle-BackColor="#aaaadd"
AlternatingItemStyle-BackColor="#eeeeee"
>
</aspataGrid>
</body>
</html>
×¢Ò⣺ҪÔËÐÐÉÏÊöACCESSÀý³ÌÇëÏÈÏÂÔØÊý¾Ý¿â£¬ÓëÀý³Ì·ÅÔÚͬһĿ¼Ï¡£
ʹÓÃÏê½âºÍÀý³Ì: http://www.now.net.cn/support/host/(ÕâÀïÓиü¶à¸üϸµÄAsp.netµÄÏêϸÀý³Ì)
-------------------------------------------------------------------------
ÍƼö¿Õ¼ä£º
¡ñÔö¼ÓÐÍC ËÍCNÓòÃû ËÍ300M ¿Õ¼äÓÊÏä 698 Ôª/Äê
¶ÀÁ¢250MÍøÕ¾¿Õ¼ä ,ͬʱ֧³Ö ASP, ASP.NET£¬CGI;
Microsof FrontPage2000 À©Õ¹Ö§³ÖACCESSÊý¾Ý¿â
¡ñÉÌÎñCÐÍÖ÷»ú ËÍCNÓòÃû ËÍ800M ¿Õ¼äÓÊÏä 1600 Ôª/Äê
¶ÀÁ¢500ÍøÕ¾¿Õ¼ä ,ͬʱ֧³Ö ASP, ASP.NET;
Ìṩ50MµÄSQLSERVER2000µÄÊý¾Ý¿â´æ£¬Ö§³ÖACCESSÊý¾Ý¿â
ËÍ800MBÓÊÏäÓÊÏä
¡ñÐéÄâרÓÃCÐÍ»ú ËÍ2000M VIP ÆóÒµÓÊ¾Ö 4000Ôª/Äê
3000MµÄÍøÕ¾¿Õ¼ä£¬Í¬Ê±Ö§³Ö ASP, ASP.NET
Ö§³ÖSQLSERVER2000/accessÊý¾Ý¿â£¬Êý¾Ý¿â¿Õ¼ä²»ÏÞ
¡¡ ÏÖÔÚ¹ºÂòËÍ.com+.cnµÄÓòÃû
ͬʱÓб¾ÔÂÌØ´óµÄÓÅ»Ý:
¡ñ»ù±¾CÐÍÖ÷»ú+50Ôª ËÍCNÓòÃû Ãâ·ÑËÍ100MbÓÊ¾Ö 348 Ôª/Äê
¡ñ»ù±¾CÐÍÖ÷»ú+50Ôª Ë͹ú¼ÊÓòÃû Ãâ·ÑËÍ100MbÓÊ¾Ö 348 Ôª/Äê
¡ïÖйú¹ú¼Ò¶¥¼¶ÓòÃûÈ«Ãæ½µ¼Û£¡Ö»Ðè180Ôª/Äê!!!!
¡ï ·²ÊÇÆóÒµÔÚ±¾¹«Ë¾¹ºÂú300ÔªÒÔÉÏ,¾ù¿É»ñµÃ.CNÓòÃû!!!
ÏêÇéÇë¼û£ºhttp://www.now.net.cn/host
È«ÇòÃâ·Ñ×Éѯµç»°,Çëµã»÷ http://www.now.net.cn/customer/moreline.net
»¶ÓÄú·ÃÎÊ http://www.now.net.cn/host
Q QÔÚÏß×Éѯ£º45031657 188092185
TEL£º0756-2281070 2282587