MS SQL 2014

Sorry if this was answered, but i need to get this addresses ASAP. I am working on a Windows 10 64x machine, trying to connect to MS SQL server 2014 database. I know the user name and password are working correctly, However when trying to connect with XOJO it fails giving me the message “Could Not Connect To Database”. I also made sure that the extension was installed, and we are using XOJO pro.

connection strings can be tricky - - - try looking here. Found one here yesterday

https://www.connectionstrings.com/

I would try to download the MS SQL Server Management Studio (free) and try to connect with that tool, it might reveal an issue or your ability to connect with the database from your machine.

I use MS SQL quite a bit with XOJO and haven’t had any connection issues. One note: Prepared statements do not work work well with the XOJO MSSQL plugin (do a forum search to learn more).

Can you post some code on how you are trying to connect to the database?

I was just trying to connect via Insert database [Select MSSQL] dialogue. I am checking into it for the developer of the XOJO app. Me personally, I develop on Visual Studio so i have no clue how to use this application. I did check permissions and they are correct. We both are having the issue.

Okay, I don’t use the connection dialog IDE. I connect using code, typically in the app open event.

XOJO LR

Is SQL Server Native Client 11 installed on your machine? (This is required for each client machine). Has the server been configured for TCP connections?

If your MS SQL server 2014 database is connected to your LAN the access should work with this:

[code]
msdb = new MSSQLServerDatabase

msdb.host = iv_host
msdb.DatabaseName = iv_DatabaseName
msdb.UserName = iv_user
msdb.Password = iv_password
if iv_port > 0 then
msdb.Port = iv_port
end if

if msdb.Connect = false then
’ error message
end if
[/code]
I use the Microsoft SQL Server 2016 Express on port 1433.
The Express-Database must be configured to allow net access. As far as I remember I have added into the “SQL Server Configuration Manager” the TCP/IP protocol and added into the TCP/IP protocol the port 1433.

If you can’t connect with official plugin, you can try the MBS Xojo SQL Plugin as an alternative.
It can connect via DB Library, OLE DB or ODBC locally without installing extra drivers.
And with freetds library, you can connect from Mac and Linux.

If you are using express then it could be that you need the instance name in the host as well as the name (or ip)

192.168.0.1\sqlexpress

Each instance can use a different tcp port also.
You can find that in the sql administrator program
You need to enable tcp connections on earlier versions too using the sql services app.