久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

asp.net如何連接MySQL

 woodsia 2008-08-10
asp.net如何連接MySQL
錄入時(shí)間:2008-07-17 15:14 類別:電腦常識(shí) 共享:否    

問(wèn):
請(qǐng)問(wèn)asp.net如何連接MySQL,?
另外asp.net如何連接遠(yuǎn)程的MySQL,?
謝謝
______________________________________________________________________________________________
答1:
http://www./products/myodbc/manual.html#ODBC.NET(C#)


http://www.csdn.net/Develop/read_article.asp?id=16437

.NET中各種數(shù)據(jù)庫(kù)連接大全


______________________________________________________________________________________________
答2:
oConn.Open "Provider=MySQLProv;" & _
           "Data Source=mySQLDB;" & _
           "User Id=myUsername;" & _
           "Password=myPassword"

______________________________________________________________________________________________
答3:
下載一個(gè)mysql的ODBC就行了,,這個(gè)ODBC在mysql網(wǎng)站上有,。
______________________________________________________________________________________________
答4:
<%@ Page Language="vb" Debug="true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<html>
<script language="VB" runat="server">
 Sub Page_Load(Src As Object, E As EventArgs)
    Dim myConnection As SqlConnection
      myConnection = New SqlConnection("server=localhost;" _
         & "database=數(shù)據(jù)庫(kù);USER ID=sa;PWD=")
      Dim myCommand As SqlDataAdapter = New SqlDataAdapter("SELECT *" _
         & " FROM 表", myConnection)
     Dim ds As DataSet = New DataSet()
      myCommand.Fill(ds)
      Dim view As DataView = ds.Tables(0).DefaultView
      view.Sort = sortField & " ASC"
      MyDataGrid.DataSource = view
      MyDataGrid.DataBind()
   End Sub
</script>

<body>
   <%-- Display the data  in the body of the page. --%>
   <h3><font face="Verdana">Sorting Data in a DataGrid Control</font></h3>
   <%-- Within a form, create a DataGrid control and initialize its
      attributes. --%>
   <form runat="server">
      <ASP:DataGrid id="MyDataGrid" runat="server"
         OnSortCommand="MyDataGrid_Sort"
         Width="700"
         BackColor="#ccccff"
         BorderColor="black"
         ShowFooter="false"
         CellPadding=3
         CellSpacing="0"
         Font-Name="Verdana"
         Font-Size="8pt"
         HeaderStyle-BackColor="#aaaadd"
         AllowSorting="true"
      />
   </form>
</body>
</html>

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,,不代表本站觀點(diǎn),。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買(mǎi)等信息,,謹(jǐn)防詐騙,。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào),。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多