Vscode-mssql: Copy results to clipboard does not work

Created on 7 Feb 2017  路  10Comments  路  Source: microsoft/vscode-mssql

  • MSSQL Extension Version: 0.2.1
  • VSCode Version: 1.9.0
  • OS Version: ubuntu 16.04 LTS

Steps to Reproduce:

  1. Execute any query
  2. Select any from the results table
  3. Press Ctrl+C (or click on "Copy" or click on "Copy with Headers" in the context menu)

Expected behavior: The selected Text was copied to the clipboard

Actually behavior: Nothing was copied to the clipboard. (Also, the current content of the clipboard is still there.)

bug

Most helpful comment

Hey @nilslueders and @mathsalmi, thanks for bringing this to our attention. Can you please verify whether your Linux machine has xclip installed? The copy-paste command needs xclip to work, and it might be possible that it's not installed on your machine.

You can install it by running "sudo apt-get install xclip". Please let me know if it still doesn't work.

All 10 comments

Same happens here.

vscode

Hey @nilslueders and @mathsalmi, thanks for bringing this to our attention. Can you please verify whether your Linux machine has xclip installed? The copy-paste command needs xclip to work, and it might be possible that it's not installed on your machine.

You can install it by running "sudo apt-get install xclip". Please let me know if it still doesn't work.

Touch茅! Now it works like a charm. Would it be possible to improve the behavior of the plugin in these cases? I don't know maybe show a required dependency on the console or something.

Thanks for your help!

Thanks @abist ! Its working now. (I agree with @mathsalmi .)
Also, thank you very much for this absolutely great code editor!

@mathsalmi @nilslueders Thanks! We will definitely try to change the behavior of the plugin.

Well I finally searched for the right thing to find this issue and answer. Thanks @abist for the super easy fix for something I've been just living with for a while. Maybe just adding a small note on the readme/supported operating systems section about xclip would help others and be a much easier thing in the short term.

Solved for me too after Googling and landing on this issue. Some sort of error message/popup if xclip is not installed would really help.

I'm using

  • OS W10 10.0.18362
  • SQL Server v18.0
  • Code 1.40.0
  • mssql Version: 1.7.0

Steps to Reproduce:

  1. Execute any query
  2. Select any from the results table
  3. Press Ctrl+C (or click on "Copy" or click on "Copy with Headers" in the context menu)

Expected behavior: The selected Text was copied to the clipboard

Actually behavior: Last thing that was copied is inserted on the clipboard, anything less than results table, so step 3 has any effect at all.

Sometimes, save as CSV, Excel, Json. Doesn't work either.

Edit: Its a loop like that:

  1. works fine for 2/3 times
  2. stop working
  3. restart vs code
  4. repeat.

@vonmoraes Which version of the extension are you using?

@vonmoraes Which version of the extension are you using?

Version: 1.7.0

Was this page helpful?
0 / 5 - 0 ratings