-
Notifications
You must be signed in to change notification settings - Fork 57
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
Feature request: support ADO.NET connection strings #478
Comments
thx for opening an issue! How about following the same pattern as
|
|
It would be really interesting to be able to pass a JSON string or even the path or URL to a JSON file kind of like a .net app.config file. |
the context file sqlcmd creates for "modern" callers is that JSON file. sqlcmd in back-compat mode will use the default context if |
The interesting thing is that the powershell |
That could potentially work, assuming that it would be fine to pass only the entire ado.net style connection string without having to specify anything else... Having said that, I was hoping for a simple solution that would let the user pass in an ado.net connection string and then the sqlcmd code could hand it off unparsed to go-mssql, rather than something like the above that seems significantly more complicated in terms of having to map the keys into connection params, check for invalid entries, etc etc. |
I think both types of parameters could work: 1, a Supporting both approaches broadens the audience. There are a lot of existing legacy sqlcmd users who probably just need to pass one or two new values to the connection string and they could modify their scripts by appending |
That sounds good to me David! I'll probably take a swipe at a PR for the "whole connection string" feature, and then the other one can be a followup. I'm not sure if I have time for both, and my personal usecase is for the former :D Cheers |
This is the same as #108 |
@shueybubbles I have the feature nearly done locally :) I'm running into one issue regarding a unit test, what's a good way for me to ask someone for a little guidance? I could open up a draft PR with the current work, and add a comment regarding the issue I'm having. |
a draft PR is probably the best option |
It would be very useful if there was a way to pass in an
ADO.NET
-style connection string instead of separate server/user/pw/etc params.This is already supported by
go-mssqldb
, so I'm hoping that the amount of work required to add this feature wouldn't be excessive :)If this sounds like a good idea, and we can get agreement on how the UX should look (a new flag
--connection-string
/-S
perhaps), then I can probably work on creating a PR for this feature :)Thanks,
Eric
The text was updated successfully, but these errors were encountered: