Comments (9)
I've set up an example repo that takes the Friends ecto example and have dockerized it. The master branch is working with Postgres.
I've attempted to get a mssql branch going, but no luck so far. I've used the Dockerfile from mssqlex and set up a Docker Compose file.
My confix.ex file looks like this:
config :friends, ecto_repos: [Friends.Repo]
config :friends, Friends.Repo,
adapter: MssqlEcto,
database: "friends_repo",
username: "sa",
password: "reallyStrongPwd123",
hostname: "mssql_db",
instance_name: "MSSQLSERVER",
port: "1433",
pool_size: 10,
odbc_driver: "{ODBC Driver 13.1 for SQL Server}"
When firing up iex -S mix
(via Docker Compose), I get this error:
[error] Mssqlex.Protocol (#PID<0.985.0>) failed to connect: ** (Mssqlex.Error) [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 13.1 for SQL Server' : file not found Connection to database failed. | ODBC_CODE 01000 | SQL_SERVER_CODE 0
Perhaps I have my configuration wrong, but I'm also wondering if the Dockerfile is installing the wrong version of msodbcsql. Any thoughts? I'd love to use this project. Thank you.
from mssql_ecto.
Have you gone through the Installation steps, installing the Erlang ODBC application and the ODBC driver?
Edit: Oh wait sorry, you're doing it with docker...
from mssql_ecto.
Hi @shdblowers ~ yes, still seeing the same error. For what it's worth, msodbcsql v17.0.1.1-1 is getting installed by Docker.
from mssql_ecto.
OK, looks like you've specified to use ODBC Driver 13.1 in your config, can you double-check which ODBC driver version you have installed?
It might work if you change this value to "{ODBC Driver 13 for SQL Server}"
from mssql_ecto.
I like your idea of having a simple application that mssql_ecto as a reference.
If you'd like we can update the README to link to your project once everything is working correctly?
from mssql_ecto.
Awesome, I got it working by changing odbc_driver
to "{ODBC Driver 17 for SQL Server}". ODBC Driver 17 is what the MS script installs as of today; I couldn't find an elegant way to set the msodbcsql version number.
Sure, I've renamed and improved the README a bit:
https://github.com/cpursley/mssql_ecto_friends
from mssql_ecto.
This same bug also affects the tests for this project, didn't realise because the tests haven't been run since MS updated the driver to 17.
from mssql_ecto.
Also I have linked your project in the README
from mssql_ecto.
I figured as much (regarding tests). Cheers.
from mssql_ecto.
Related Issues (20)
- support for xml column type HOT 4
- Variable insertion misaligned with using WHERE IN HOT 4
- Run tests using latest version of Elixir
- Support for uniqueidentifier / UUIDs HOT 5
- Installing Erlang ODBC on Windows 2012 R2 HOT 9
- Encoding issues with nvarchar(max) columns? HOT 1
- Support Ecto 2.2 HOT 7
- App created with phx.new test --database mssql won't compile HOT 6
- DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause. HOT 10
- Compilation error in file lib/mssql_ecto/query_string.ex == HOT 1
- How to handle capital letters in database column HOT 1
- UUID ** (ArgumentError) invalid or unknown type :uuid for field :DemoCategoryKey HOT 2
- Column type not supported | ODBC_CODE | SQL_SERVER_CODE 0 using type uniqueidentifier HOT 1
- Can't open lib HOT 1
- Concurrent DB Tests Failing HOT 1
- Alter table remove column migration removes primary key
- Associations do not work with non-standard primary keys HOT 3
- Preloading associations with differing schemas fails
- Ecto-3 support. HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mssql_ecto.