正在阅读:.Net中操作MySql数据库.Net中操作MySql数据库

2004-03-31 15:07 出处:CSDN 作者:杨忠勋 责任编辑:sdq

  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_Requettes.MyODBCDataset(
               SQL,
               constantes.ODBCBase,
               constantes.ODBCServer,
               constantes.ODBCPwd,
               constantes.ODBCUser,
               "MonDataset")

  此程序用到的类库可在如下地址下载:http://www.codeproject.com/dotnet/MySQLConnexion/MySQLConnexion.zip


察看评论详细内容 我要发表评论
作者笔名简短内容 发表时间
:
键盘也能翻页,试试“← →”键

相关文章

关注我们

最新资讯离线随时看 聊天吐槽赢奖品