vim-dadbod icon indicating copy to clipboard operation
vim-dadbod copied to clipboard

sqlcmd hangs vim on windows7

Open dhazel opened this issue 6 years ago • 1 comments

Environment Vim8 on Windows7

Issue When calling DB to connect to an sqlserver database, a spawned command window stays open and vim hangs until the window is closed. (names below are redacted for security)

:DB g:sandbox = sqlserver://username:password@server

Notes This behavior does not happen when using osql in place of sqlcmd. In that case, there is no spawned command window left hanging open, and dadbod works as expected.

Desired Outcome I would like to be able to use sqlcmd rather than osql because sqlcmd has the -W option that will trim trailing whitespace from the query results. Without trimmed trailing whitespace, for the db's I am working with, the fields are returned absurdly long, making the output nearly unreadable.

What I've Tried

  • Skimming the dadbod code for clues about how input/output are handled. Unfortunately, my combined vimscript and windows command line skills are too weak given the time I have for debugging.
  • Swapping out sqlcmd for osql. The results of that are included in the write-up above.

dhazel avatar Nov 01 '18 16:11 dhazel

This is out of my wheelhouse, but see #5 for some context.

tpope avatar Nov 01 '18 18:11 tpope