Closed xiaogu-space closed 3 years ago
This dsn should works if you try to connect with any password and host/instance:
dsn = fmt.Sprintf("sqlserver://%s:%s@%s?database=%s", cfg.Username, strings.ReplaceAll(url.QueryEscape(cfg.Password), "+", "%20"), cfg.Host, cfg.Database)
Without instance, only host and require port:
dsn = fmt.Sprintf("sqlserver://%s:%s@%s:%d?database=%s", cfg.Username, strings.ReplaceAll(url.QueryEscape(cfg.Password), "+", "%20"), cfg.Host, cfg.Port, cfg.Database)
thanks
Describe the bug A clear and concise description of what the bug is.
If you are seeing an exception, include the full exceptions details (message and stack trace).