Comments (29)
Nuget package now depends on server types package, are you sure it was installed?
from fsharp.data.sqlclient.
The same project works on Windows without modification. In the error message, it says it is trying to load the type from System.Data
. This type is probably not implemented in mono. What is it used for, and it is important enough to break mono compat?
from fsharp.data.sqlclient.
I don't see anything about System.Data in the error message though. This reference is for Spatial types. Also, see issue #46, Don thinks it's must have.
It comes with unmanaged dll which you probably have available in Windows. Can you please have a look at Readme in their nuget, maybe it's still possible to have this feature on Mono.
from fsharp.data.sqlclient.
From the first two comments in that link, it seems that Spatial types can not be used on mono.
I've never used spatial types, however breaking mono compat kills this library for me. Can we find some way to enable both?
from fsharp.data.sqlclient.
I'll look into this.
from fsharp.data.sqlclient.
@rojepp I am trying to do mono test using Valiant as described here. Right now I'm stuck with XBuild apparently not recognizing VS 2013 F# projects properly. I was wondering if you have any kind of test project I could use for these purposes.
from fsharp.data.sqlclient.
I made one quickly: https://github.com/rojepp/sqlclientmonosample
Given a valid database, this fails to compile on mono with
/Users/robert/Projects/sampleapp/sampleapp/Program.fs(12,12): Error FS3033: The type provider 'FSharp.Data.SqlCommandProvider' reported an error: Could not load type 'Microsoft.SqlServer.Server.SqlDataRecord' from assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. (FS3033) (sampleapp)
Note the extra stuff brought in by dependencies in the folder SqlServerTypes. Contains Windows interop code that naturally won't work on mono.
from fsharp.data.sqlclient.
Awesome, thanks, I'll look into building mono version without sqltypes support. What puzzles me is that apparently Entity Framework on mono supports it just fine.
from fsharp.data.sqlclient.
Hi @rojepp, setting up testing environment turned out to be a real headache. Any chance you could help us with this? I believe we could have mono-specific build target for both providers and just load SqlServer.Types assembly conditionally:
from fsharp.data.sqlclient.
I'm not sure how to help. SqlDataRecord
seems hard to conditionally build?
from fsharp.data.sqlclient.
SqlDataRecord
comes from another libary, System.Data.
I believe none of the types declared in Microsoft.SqlServer.Types
is used directly in TP code, so ideal solution would be to load it dynamically if it's available.
from fsharp.data.sqlclient.
I see. SqlDataRecord
gives a compilation error on mono, it seems it is not ported:
http://www.go-mono.com/momareports/apis/System.Void%20Microsoft.SqlServer.Server.SqlDataRecord;;.ctor(Microsoft.SqlServer.Server.SqlMetaData[])
from fsharp.data.sqlclient.
Maybe spatial types do not cause the issue, unless they are used. SqlDataRecord
is even mentioned in the exception above. :)
Microsoft.SqlServer.Types
should already only load if needed.
from fsharp.data.sqlclient.
Oh, it's much bigger problem then. Let's keep this issue open for later, I don't see any simple solution for it right now. Thank you for looking into this though.
from fsharp.data.sqlclient.
Why did you start using SqlDataRecord? What benefits does it give?
On Wed, Mar 19, 2014 at 9:26 PM, dsevastianov [email protected]:
Oh, it's much bigger problem then. Let's keep this issue open for later, I
don't see any simple solution for it right now. Thank you for looking into
this though.Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-38102407
.
from fsharp.data.sqlclient.
In initial implementation of UDTT support that you provided (which is helped us a lot) seq of tuples was used as type of parameter. Later I realized that tuples lack of intellisense for column names of UDDT and switched to seq of custom type with ctor. Parameters names for the ctor provide reasonable intellisense help. SqlDataRecord was obvious choice of "erased to" type for this custom type.
https://github.com/fsprojects/FSharp.Data.SqlClient/blob/master/src/SqlClient/SqlCommandProvider.fs#L228
Also, as side-effect of this re-factoring intermediate DataTable was not necessary.
Let me know if I expressed it clearly.
from fsharp.data.sqlclient.
I think I get what you're saying. Using SqlDataRecord
was convenient, and
now it turns out that using it means losing mono compatibility. So, what
now?
It doesn't seem to me that SqlDataRecord is all that necessary?
from fsharp.data.sqlclient.
I was not aware about Mono incompatibility. Let me think some time of what can be done.
I'm also curious, the change was made long time ago. How come you noticed just now?
from fsharp.data.sqlclient.
I haven't updated my old project that use the TP. I just had to code up a
new simple sql-centric app, so I tried the recent version.
from fsharp.data.sqlclient.
Hey @rojepp, I installed Xamarin 4.2.3 on my windows box and I was able to build and run the project just fine, which is weird.
I tried to do the same from ubuntu vagrant box but the problem is that I don't have full version of Sql Server available right now, and I can't target Sql Express on host machine.
@dmitry-a-morozov may have a chance to look into it in enterprise environment later.
Sorry we can't be more help for now.
from fsharp.data.sqlclient.
I think on a Windows box, Xamarin defaults to using .Net instead of mono. You should be able to switch target on the project to see the problem.
from fsharp.data.sqlclient.
Right, I forgot to mention I was targeting Mono/Net 4. Anyway, it doesn't look like problem is reproducible on Windows, @dmitry-a-morozov will try it on Mac later this week.
from fsharp.data.sqlclient.
@rojepp I hope I made your day ! :)
from fsharp.data.sqlclient.
Nice, will try it out!
from fsharp.data.sqlclient.
Sorry, it doesn't work on OSX. This is with Xamarin Studio 5.
The same project compiles on Windows. v1.2.17
from fsharp.data.sqlclient.
@rojepp I hope you're prepared to send me flowers or chocolate :). Mono on Mac is missing property called "TypeName" which is a key to implement TVP properly. The best workaround I was able to find is to call it only for TVP parameters via reflection so it won't break in Xamarin on mac. Therefore TVP on Mac is not supported. Other kind of parameters seems to work fine.
from fsharp.data.sqlclient.
Thanks!
from fsharp.data.sqlclient.
What is TVP?
from fsharp.data.sqlclient.
Table valued parameters
from fsharp.data.sqlclient.
Related Issues (20)
- Dacpac support info HOT 3
- "F# Formatting" link is broken
- Can't build/run from the commandline, but can from Visual Studio 2019 HOT 2
- Question: Creating a provider without an access to DB HOT 3
- SqlEnumProvider breaks VS 2019 HOT 2
- Not platform detection Fable HOT 1
- Build is broken without full VS installation
- Fixed length binary columns in user defined table types fail when constructed HOT 8
- Cannot use User Defined Table Types with the SqlCommandProvider HOT 5
- .NET 6 support HOT 6
- One line summary of the bug HOT 2
- TVP Column Ordering is incorrect as of version 2.1.0
- Cannot use parameter name more than once in a script HOT 3
- System.Data.SqlClient is not supported on this platform. HOT 5
- Conversion failed when using User Defined Table Types HOT 1
- Any 2023 tricks for running on Windows? HOT 3
- NullReferenceException in SqlConnection.UseLocally HOT 1
- Support for 'Active Directory Interactive' authentication HOT 3
- dotnet SDK projects using FSharp.Core version 7.0.0 breaks at runtime HOT 3
- SQL LIKE operation doesn't recognize variable HOT 2
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 fsharp.data.sqlclient.