Forum Discussion

cl27274's avatar
cl27274
Copper Contributor
Feb 04, 2021

A connection was successfully established with the server, but then an error occurred during the pre

@Sergei Baklan 

I'm trying to use parameters in power query. I am now having a new error appear:

DataSource.Error: Microsoft SQL: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
Details:
    DataSourceKind=SQL
    DataSourcePath= (some server name)
    Message=A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
    ErrorCode=-2146232060
    Number=10054
    Class=20

I'm connecting to a Linux server, OS: 3.16.0-4-amd64.

Typically, when connecting to it I go to get Data -> Odbc -> and then select the DSN and paste my SQL statement in the advanced options ... and it works perfectly

 

Now I'm trying to use the following M code and it is giving me the error shown above

Source = Sql.Database(Server, Database,.....)

Thank you for the help

Resources