WEB开发网
开发学院数据库MySQL .Net中操作MySql数据库 阅读

.Net中操作MySql数据库

 2007-11-11 13:43:00 来源:WEB开发网   
核心提示: Dim MyODBCConnexion As New OdbcConnection(MyConString) Try Dim ds As New DataSet() Dim cmd As OdbcDataAdapter = New OdbcDataAdapter(ReqSQL, MyConString)

  Dim MyODBCConnexion As New OdbcConnection(MyConString)
   Try
     Dim ds As New DataSet()
     Dim cmd As OdbcDataAdapter = New
     OdbcDataAdapter(ReqSQL, MyConString)
     Dim MyCommand As New OdbcCommand()
     Dim MyDataReader As OdbcDataReader
     cmd.Fill(ds, NomDataSet)
     MyODBCConnexion.Close()
     Return ds
   Catch MyOdbcException As OdbcException
   '
    HttpContext.Current.Response.Write(MyOdbcException.ToString)
   Catch MyException As Exception
   '
    HttpContext.Current.Response.Write(MyException.ToString)
   End Try
End Function

   //对函数的调用

  Dim MonDatasetTemp As DataSet = MySQL(和PHP搭配之最佳组合)_Requettes.MyODBCDataset(
        SQL,
        constantes.ODBCBase,
        constantes.ODBCServer,
        constantes.ODBCPwd,
        constantes.ODBCUser,
        "MonDataset")

  此程序用到的类库可在如下地址下载:http://www.codeproject.com/dotnet/MySQL(和PHP搭配之最佳组合)Connexion/MySQL(和PHP搭配之最佳组合)Connexion.zip

上一页  1 2 

Tags:Net 操作 MySql

编辑录入:coldstar [复制链接] [打 印]
赞助商链接