[Mono-dev] Mono, TDS and SQL Server 2012
Chris Tacke
ctacke at opennetcf.com
Fri Aug 1 17:15:22 UTC 2014
I'm trying to add SQL Server support to the Mono (on Linux, not Android if it matters) version of one of our products.
I have a codebase that works fine on Windows, but under Mono, it's not behaving. We're using SQL Authentication, not NT.
I am able to get back a list of table names, so I know it's "talking" to the database, but when I attempt to query rows from a table I get this:
[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: Unknown packet type 129
at Mono.Data.Tds.Protocol.TdsComm.GetPhysicalPacketHeader () [0x00000] in <filename unknown>:0
at Mono.Data.Tds.Protocol.TdsComm.GetPhysicalPacket () [0x00000] in <filename unknown>:0
at Mono.Data.Tds.Protocol.TdsComm.Peek () [0x00000] in <filename unknown>:0
at Mono.Data.Tds.Protocol.Tds.NextResult () [0x00000] in <filename unknown>:0
at System.Data.SqlClient.SqlCommand.ExecuteScalar () [0x00000] in <filename unknown>:0
at OpenNETCF.ORM.SQLStoreBase`1[OpenNETCF.ORM.SqlEntityInfo].ExecuteScalar (System.String sql) [0x00000] in <filename unknown>:0
at OpenNETCF.ORM.SqlServerDataStore.get_ServerVersion () [0x00000] in <filename unknown>:0
at OpenNETCF.ORM.SqlServerDataStore.Fetch (System.String entityName, Int32 fetchCount, Int32 firstRowOffset, System.String sortField, FieldSearchOrder sortOrder, OpenNETCF.ORM.FilterCondition filter, Boolean fillReferences) [0x00000] in <filename unknown>:0
at SolutionFamily.Storage.DataEntityProvider.GetEntityInstances (System.String entityName, Int32 skipNumber, Int32 retrieveNumber) [0x00000] in <filename unknown>:0
{more call stack omitted}
So it looks like the TDS version in Mono is old, maybe? Packet type 129 looks like it's a "result" packet:
http://www.freetds.org/tds.html#t129
And it's been in use since SQL Server 7, which itself is pretty far from "recent".
So my questions, I guess, Are:
- Is connecting to a SQL Server 2012 database from a Mono app a supported scenario?
- Is there a newer version of TDS on the System.Data.* stuff available that adds support?
- Has anyone had any luck connecting to a "modern" version of SQL Server?
- Any thoughts on how to proceed (other than debugging and attempting to implement this stuff myself)?
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20140801/ac6a4000/attachment.html>
More information about the Mono-devel-list
mailing list