0

I am trying to set up emacs as a database client for a MS SQL Server database with the sql-ms command. I've come across a few different tutorials and questions related to this.

However, I am running into the following problem that I cannot find an answer to. The command sql-ms seems to expect that I am using osql. But the rest of my infrastructure is using sqlcmd. Is it possible to configure sql-ms to use sqlcmd (and point it to a specific installation)? Is there any sql emacs command that I can configure to use sqlcmd?

1 Answer 1

1

The program used to start a client to MS SQL is stored in sql-ms-program which can be set with (setq sql-ms-program "sqlcmd") or using M-x customize-group then sql then look under Sql Ms Options. More information can be found in sql.el, M-x find-library then sql.

The following repository is for a sqlcmd alternative that works better with Emacs. It also discusses configuring Emacs for use with MS SQL.

https://github.com/sebasmonia/sqlcmdline

1
  • thank you! I needed to add (setq sql-ms-options (list "-C")) as well, but that worked. Thanks for the tip to use find-library, I didn't know about that. Commented May 22 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.