Comments (6)
Hi @damonvjanis
Even with using mssql_ecto with the Phoenix command you also have to follow the installation instructions in the Readme. Specifically to do with installing Erlang ODBC and Microsoft's ODBC Driver.
from mssql_ecto.
After doing this please let me know if you still cannot get it working.
from mssql_ecto.
@shdblowers thanks for taking a look at this.
I apologize, I should have included those details in the original request.
Before running mix phx.new, I had verified that Erlang ODBC was accessible on my system by opening an Erlang shell and entering 1>odbc.start()
which returned a response of ok
.
I had also previously verified that my environment had the Microsoft ODBC driver by attempting to install the driver (version 13) from the download page, and when it went to install the system informed me that I already had the current version installed. I double-checked by navigating to the 64 bit ODBC application in Windows, selecting the Drivers tab, and the driver was listed.
I've done a little more digging on the issue and here's what I'm finding:
In mssql_ecto/lib/mssql_ecto/query_string line 251, there is a key value pair fields: fields
. This is what was throwing the compile error. I took a look in Ecto for where %Ecto.SubQuery{}
was being defined, and it's in ecto/lib/ecto/query.ex. On line 5, the struct is defined with the following: defstruct [:query, :params, :select, :cache]
.
The error is happening because :fields
is not on that list. I looked through the GitHub history and found that line 5 changed on August 4th, removing :fields
(link to history here).
I was able to get around the compile error by changing fields: fields
to params: fields
in mssql_ecto/query_string.ex, and I was able to successfully connect to my database. I don't understand Ecto, MSSQL_Ecto or Elixir at a deep enough level to know what the correct fix is, but if I have some time I'll dive into the details and see if I can be more confident in proposing a solution.
from mssql_ecto.
I think this is related to #25, right @shdblowers ?
We're not quite there yet with Ecto 2.2 compatibility and I believe the template scaffolds up that version. You should be able to downgrade to Ecto 2.1.x and have everything work.
from mssql_ecto.
Yes I think so too @jbachhardie.
Will release a patch for this version that changes the dependency on ecto from 2.1
to 2.1.0
, which should make this issue more clear.
Will also continue on upgrading to 2.2 when I can
from mssql_ecto.
That's been done now, here: ae2d567
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
- 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
- Difficulty setting up HOT 9
- 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.