I'm trying to connect to a remote SQL Server using this code:
cStringConnect =("DRIVER={SQL Server}; SERVER=201.19.258.148; Address=201.19.258.148,1433; UID=sa; DATABASE=DB_PRODUCAO; Network=DBMSSOCN")
nID = SQLStringConnect(cStringConnect)
But I get this error message:
---------------------------
Microsoft SQL Server Logon
---------------------------
Connection Failure:
SQLState: '01000'
SQL Server Error: 10060
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (Connect()).
Connection Failure:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server inexistent or access denied
The problem is that
I can connect to the Server using my SQL Server Enterprise Manager ou Query Analizer just passing the IP of the server.The user's of the locale network where the server is are connecting to SQL Server using the aplication with the same code for connection.
I also checked that SQL Server Network Utility and Desktop Network Utility are both configured to use TCP/IP, and the ports 1433 and 1434 are open.
What could be the problem?
What I'm missing to establish the connection to que remote server?
Any help is welcome.
TIA
Peter