Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLCMD mode fails to parse some sqlcmd keywords #7381

Open
udeeshagautam opened this issue Sep 26, 2019 · 1 comment
Open

SQLCMD mode fails to parse some sqlcmd keywords #7381

udeeshagautam opened this issue Sep 26, 2019 · 1 comment
Assignees
Labels
Area - Query Editor Enhancement Request for new features or functionality Triage: Done
Milestone

Comments

@udeeshagautam
Copy link
Contributor

udeeshagautam commented Sep 26, 2019

Azure Data Studio Version:
Version: 1.11.0 (user setup)
Commit: acc85c2
Date: 2019-09-03T23:55:40.484Z
VS Code 1.37.0
Electron: 4.2.9
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362

There are some sqlcmd keywords not being handled by Batch Parser and need specific handling. SSMS handles them seperately and ADS does not have that capability. This list includes
:Connect
:Error
:Exit
:On Error
:Out
:Quit
:!!

Steps to Reproduce:

  1. Open Query editor and switch on SQLCMD Mode
  2. Run a query like

:Connect localhost

Use Database1
Go

Select *
from Table1

Errors out saying,
Execution failed due to an unexpected error:
SQL Execution error: A fatal error occurred.
Incorrect syntax was encountered while :Connect was being parsed.

Which it works correctly in SSDT and SSMS.

@art-ist
Copy link

art-ist commented Aug 31, 2022

Any news on this for 2022?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area - Query Editor Enhancement Request for new features or functionality Triage: Done
Projects
Development

No branches or pull requests

4 participants