On Fri, 2010-04-23 at 08:10 -0700, Nitin wrote:
> Whenever we work with dblinq version 0.19 and 0.20.1, it give an error
> first of all not to work with stored procedure error to 'dont know how
> to convert sqltype system to manged code' whereas perivious version
> 0.17 generate the stored procedure . other problem  is MySql datatype
> time is defined by c# System.Timespan but dbmetal convert it to
> datetime in cs file when fetching data it gives an error. Please help
> me out or if this is a bug then can i expect the fix in next release?

Looks like: http://code.google.com/p/dblinq2007/issues/detail?id=203

To repeat my last comment in the above, I don't know why 'system' is
being sent to SchemaLoader.MapDbType().  What I find surprising is that
it worked for you at all; prior to 0.19 MapDbType() would return null
instead of throwing an exception, resulting in uncompilable C# code in
many circumstances (e.g. a property with no type --> error).

I guess stored procedures did things differently enough that the lack of
a type wasn't a problem. :-/

As for the 'time' type, why would TimeSpan make more sense than
DateTime?

Regardless, the proper solution is to kill off SchemaLoader.MapDbType()
and ask the ADO.NET provider what the appropriate type mapping is.  This
is currently done in DbSchemaLoader.ReadColumns() (by querying the
IDbConnection for the DataTypes schema), but the only provider that uses
DbSchemaLoader is the SqlServerSchemaLoader (though SQLite can also use
it if you use `DbMetal --with-schema-loader=...`).

We should migrate all the providers to use DbSchemaLoader (thus passing
off the SQL type to managed type mapping to the appropriate ADO.NET
providers) and remove SchemaLoader.MapDbType(), as it's crufty, buggy,
and constantly out of date (as databases add new data types).

 - Jon


-- 
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en.

Reply via email to