odbc version for SQL Server

yitam's Avatar

yitam

09 May, 2017 04:42 PM

Hi, in our test environment we employ Appveyor and use the provided SQL Server based on https://www.appveyor.com/docs/services-databases/

You can take a look at https://github.com/Microsoft/msphpsql/blob/dev/appveyor.yml

However, we notice that the ODBC driver that comes with the package is from last year. We need to test the new additions in the latest ODBC drivers (dated Feb 2017). Our current script doesn't seem to overwrite the old ODBC. Do you have any suggestions?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 09 May, 2017 06:07 PM

    Ilya Finkelshteyn's Avatar

    Hello,

    File this issue.

    Please use this script as temporary workaround:

    Write-Host "Installing ODBC driver..." -ForegroundColor Cyan
    Write-Host "Downloading..."
    $msiPath = "$($env:USERPROFILE)\msodbcsql.msi"
    (New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/D/5/E/D5EEF288-A277-45C8-855B-8E2CB7E25B96/x64/msodbcsql.msi', $msiPath)
    Write-Host "Installing..."
    cmd /c start /wait msiexec /i "$msiPath" /q
    del $msiPath
    

    Please let us know if this workaround works for you.

    Ilya.

  2. 2 Posted by yitam on 09 May, 2017 07:10 PM

    yitam's Avatar

    Thanks Ilya for your prompt response. Good news is that it works for 64 bit environment! Unfortunately, this doesn't seem to affect the 32 bit one. Also, I need to hardcode the path to that msi file (which is totally fine actually):

    This is the extract of the appveyor.yml

    - ps: >-
            If ($env:BUILD_PLATFORM -Match "x64") {
                (new-object net.webclient).DownloadFile('https://download.microsoft.com/download/D/5/E/D5EEF288-A277-45C8-855B-8E2CB7E25B96/x64/msodbcsql.msi', 'c:\projects\msodbcsql.msi')
            } Else {
                (new-object net.webclient).DownloadFile('https://download.microsoft.com/download/D/5/E/D5EEF288-A277-45C8-855B-8E2CB7E25B96/x86/msodbcsql.msi', 'c:\projects\msodbcsql.msi')
            }
        - cmd /c start /wait msiexec /i "c:\projects\msodbcsql.msi" /q

  3. Support Staff 3 Posted by Ilya Finkelshte... on 09 May, 2017 09:35 PM

    Ilya Finkelshteyn's Avatar

    Oh, this is because AppVeyor build works are x64 VMs and 32-bit ODBC driver cannot be installed on it. If you try to install 32-bit ODBC driver manually you will see 'Unsupported operation system' error.

    I think that there are some misunderstanding about platform setting in AppVeyor. It is msbuild target, not OS bitness.

    Ilya.

  4. 4 Posted by yitam on 09 May, 2017 09:51 PM

    yitam's Avatar

    Wonderful! It works now, thanks a lot, Ilya!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac