How to connect OpenEMR to SQL Server database

cvadnala wrote on Thursday, July 10, 2014:

I downloaded the OpenEMR application and installed in my machine. Currently configured to MySql database.

But, I want to work OpEMR application with SQL Server database.

How to connect OpenEMR to SQL Server database.

yehster wrote on Thursday, July 10, 2014:

To switch OpenEMR to work with SQL Server would be very difficult.

Although OpenEMR uses ADODB as an abstraction layer to the database, which does have SQL Server drivers, there are a number of MySQL specific features in use, such as Autoincrement.

Here is the code where OpenEMR chooses which database driver to use.

Changing this to be SQL server instead of MySQL is where you would start, but there are a lot more things you would have to do in order to get it to work, even partially.

Modifying the .sql that creates the empty schema to be compatible with SQL Server would be a next big step.

You might be able to overcome that problem by exporting a working database from MySQL and importing it into SQL Server and using that as a baseline.

I don’t know your motivation for wanting to use SQL Server instead of MySQL, so you are going to have to weigh the difficulty in making the changes with the advantages of SQL Server. The issues I mention here are but a few of many other problems you are likely to encounter.

omarchirine wrote on Sunday, March 22, 2015:

hi,t’am trying to connect to database openemr but an error occuors:Erreur : SQLSTATE[HY000] [1049] Base ‘openemr’ inconnue

fsgl wrote on Sunday, March 22, 2015:

What is your operating system?

Which download of OpenEMR are you installing?

Are you using another database, not MySQL?

It is difficult to know why you are not connecting to the database without more information.

My client wants to use MSSQL with OpenEMR. We dont have any other option for backend. Please help. Request to provide reference and feedback.

OpenEMR works with MySQL.
You can download Xampp for windows and install OpenEMR there