SQLDMO.SQLServer: "Сбой процедуры инициализации библиотеки динамических ссылок (DLL)".

У меня возникли проблемы с запуском следующего фрагмента кода, и я не понимаю, почему он не работает:

VBS Script:

On Error Resume Next

WScript.StdOut.WriteLine("Start")

Dim oServer
Set oServer = CreateObject("SQLDMO.SQLServer")
oServer.LoginSecure = True
oServer.Connect "(local)"

If (Err.number <> 0) Then
    WScript.StdOut.WriteLine "Failed to connect to server (" & Err.number & ")"
    Err.Clear
    WScript.Quit(-1)
End If

Ошибка всплывающего окна:

---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Runtime Error!

Program: C:\Windows\system32\cscript.exe

R6034

An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.


---------------------------
OK   
---------------------------

Консольный вывод:

C:\Users\mryan\Documents\Code\script>cscript tfes_migrate.vbs
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Start
Failed to connect to server (424)

Я установил пакет обратной совместимости SQLServer2005.

Любые идеи были бы хорошы!

0 ответов

Другие вопросы по тегам