會員登錄 - 用戶注冊 - 網(wǎng)站地圖 Office中國(office-cn.net),專業(yè)Office論壇
當前位置:主頁 > 技巧 > 其它(Other) > 其它技巧 > 正文

批量去除通過ODBC連接到SQL Server鏈接表名前的"DBO_"

時間:2006-11-23 23:19 來源:Access開發(fā)者 作者:朱亦文 閱讀:
Public Sub RenameLinkTableName()
    Dim dbs As Database
    Dim tdf As TableDef
    Dim strNewName As String
    Dim strName As String
   
    Set dbs = CurrentDb
    For Each tdf In dbs.TableDefs
        strName = tdf.Name
        If Ucase(Left(strName, 3)) = "DBO" Then
            strNewName = Right(strName, Len(strName) - 4)
            tdf.Name = strNewName
            tdf.RefreshLink
        End If
    Next
End Sub

(責任編輯:admin)

頂一下
(0)
0%
踩一下
(0)
0%
發(fā)表評論
請自覺遵守互聯(lián)網(wǎng)相關的政策法規(guī),嚴禁發(fā)布色情、暴力、反動的言論。
評價: