I mean the full command that has the connection string in it, most importantly 
the driver string. Sorry for not putting that as clearly as I could...

[Joop Kiefte - Chat @ 
Spike](https://spikenow.com/r/a/?ref=spike-organic-signature&_ts=q8f5w)   
[q8f5w]

On October 15, 2020 at 16:19 GMT, farid sobhany <farid.sobh...@gmail.com> wrote:

The connection works when running the application.
Here is the connection string (changed sensitive info):
sqlserver://gh:password!655@localhost:7867?database=test_database

Thanks

On Thursday, October 15, 2020 at 6:36:11 AM UTC-7 iko...@gmail.com wrote:

Just a hunch, what does your connection string look like?

[Joop Kiefte - Chat @ 
Spike](https://spikenow.com/r/a/?ref=spike-organic-signature&_ts=q87fr)   
[q87fr]

On October 15, 2020 at 13:30 GMT, farid sobhany <farid....@gmail.com> wrote:

I have searched the whole application for that import, and I couldn't find it. 
I did import it in the test file and still got the same error.

On Thursday, October 15, 2020 at 12:43:36 AM UTC-7 be...@pferdewetten.de wrote:

Maybe you're importing it somewhere else in your main package. In any
case, adding an anonymous import in one of your _test.go-files should do
the trick.

On 15.10.20 03:53, farid sobhany wrote:
> I am using database/sql to connect to a Mssql server and it works when I
> run the application. But when I setup a test file and tried to call the
> function that makes the connection and store it in an instance, it
> complains about "Unknown driver \"mssql\" (forgotten import?)"
> I am not importing the driver in the main file and it works fine. Why
> does it complain when running the test funciton?
>
> --
> You received this message because you are subscribed to the Google
> Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to golang-nuts...@googlegroups.com
> <mailto:golang-nuts...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/e8a43561-551b-44e1-8605-283ce1f064b0n%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/e8a43561-551b-44e1-8605-283ce1f064b0n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Gregor Best
be...@pferdewetten.de

--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts...@googlegroups.com.
To view this discussion on the web visit 
[https://groups.google.com/d/msgid/golang-nuts/598c16c2-aca1-4cf2-94c7-1733c3cee30fn%40googlegroups.com](https://groups.google.com/d/msgid/golang-nuts/598c16c2-aca1-4cf2-94c7-1733c3cee30fn%40googlegroups.com?utm_medium=email&utm_source=footer).

--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
[https://groups.google.com/d/msgid/golang-nuts/a208b607-8d0f-45f4-9308-44a5c91657dfn%40googlegroups.com](https://groups.google.com/d/msgid/golang-nuts/a208b607-8d0f-45f4-9308-44a5c91657dfn%40googlegroups.com?utm_medium=email&utm_source=footer).

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c-64693-kgb16lcs-ci2dtg%3Dinc96a%402.gethop.com.

Reply via email to