[Mono-dev] Mono, TDS and SQL Server 2012

Martin Thwaites monoforum at my2cents.co.uk
Fri Aug 1 21:04:45 UTC 2014


Couple of things that will help.

Mono version, platform and whether it was compiled from source or installed
by soke other means
Sample app (not your entire codename, just a basic console app that
replicates the issue).

In the first instance I would look at replicating this using basic stuff,
I.e. Just a basic datareader on the table in a bear console app.

I believe it does work against 2012 though.  So I could be a specific data
type or possibly specific data that's causing it.

I can possibly try to replicate on Sunday if you don't get any further
response, but I think it's highly likely it's data or configuration
specific not sql version.

Martin
On 1 Aug 2014 19:02, "Chris Tacke" <ctacke at opennetcf.com> wrote:

> 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
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20140801/5d85fd3d/attachment-0001.html>


More information about the Mono-devel-list mailing list