1

I have a query that when created, used an ODBC to connect to an SQL Database.
I now need to change that because the Access file will be shared and used across our company, and I don't want to have to put ODBCs on all those computers separately if I can help it.

So, some quick google searching later I went into the query and found the property 'ODBC Connect Str' and updated it to (hopefully) connect independent of the ODBC.

The old connection string (which worked fine) was:

ODBC; DSN=Orderwise 2;Description=Orderwise Connection;UID=myusername;PWD=mypassword;DATABASE=LIVEDATA

The new connection string is currently:

ODBC;Driver={SQL Server};Server=Dc01/Orderwise;Database=LIVEDATA;Uid=myusername;Pwd=mypassword;

but whenever I try to save or run the query, it gives me the error that

ODBC -- connection to `{SQL Server}Dc01/Orderwise' failed.

I've tried it without the ODBC; section on the new string and it didn't work either. Subsequent google searches on the error aren't getting me any further.

Can anyone tell me what's going wrong please?

2
  • 2
    Assuming Orderwise is an instance name, use a backslash instead of forward slash to separate the server and instance name components: Server=Dc01/Orderwise to Server=Dc01\Orderwise. Commented Sep 17, 2020 at 10:19
  • @DanGuzman it works, Thank you so much!! would you like to convert that to an answer rather than a comment so I can accept it properly? Commented Sep 17, 2020 at 10:26

1 Answer 1

1

This makes no sense, but it works for me.

Driver={SQL Server};ODBC;Driver={SQL Server};Server=Dc01/Orderwise;Database=LIVEDATA;Uid=myusername;Pwd=mypassword;
Sign up to request clarification or add additional context in comments.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.