Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用ASP.Net-VB.Net重命名APP_数据文件夹中的microsoft access数据库_Asp.net_Vb.net - Fatal编程技术网

使用ASP.Net-VB.Net重命名APP_数据文件夹中的microsoft access数据库

使用ASP.Net-VB.Net重命名APP_数据文件夹中的microsoft access数据库,asp.net,vb.net,Asp.net,Vb.net,我希望这不是一个愚蠢的问题 我需要使用ASP.Net-VB.Net重命名APP_数据文件夹中的microsoft access数据库,以下代码对我来说没有问题。如果数据库正在使用,则可能/将导致问题 Dim mdbpath As String = Server.MapPath("~/App_Data/") Dim filename As String = "currentName.mdb" Dim newFile As String = "newName.mdb"

我希望这不是一个愚蠢的问题


我需要使用ASP.Net-VB.Net重命名APP_数据文件夹中的microsoft access数据库,以下代码对我来说没有问题。如果数据库正在使用,则可能/将导致问题

    Dim mdbpath As String = Server.MapPath("~/App_Data/")
    Dim filename As String = "currentName.mdb"
    Dim newFile As String = "newName.mdb"

    System.IO.File.Move(System.IO.Path.Combine(mdbpath, filename), System.IO.Path.Combine(mdbpath, newFile))