Open GoogleCodeExporter opened 9 years ago
"time" database type SHOULD map to TimeSpan, as per official docs:
http://msdn.microsoft.com/en-us/library/bb675168.aspx
For Geography and Geometry, there is only "object" available in the .NET
Framework.
The types you refer to are included in Microsoft.SqlServer.Types, which is a
separate install from here: http://www.microsoft.com/downloads/details.aspx?
FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en (Called Microsoft
SQL
Server System CLR Types) - more info here: http://msdn.microsoft.com/en-
us/library/ms131092.aspx
Original comment by ejls...@hotmail.com
on 18 Apr 2009 at 9:03
If "time" should be mapped to "TimeSpan", please just use the attached sql
statement
to generate a very simple single table SQL Server 2008 database and then try
run
NetTiers against it. You will find quite a few errors and also the enenty
generated
will cause error and the error message is something about can not convert
"TimeSpan"
to "DateTime". For example, entity.StartTime = stime; In short, I don't
think
that official doc is correct. I do understand that SqlGeography and
SqlGeometry are
out of Microsoft.SqlServer.Types which is (I believe) also a part of the .NET
Framework 3.5 SP1 install. These 2 are VERY VERY useful to deal with those 2
new
data types introduced in SQL Server 2008. I don't really know how useful
mapping
those two data types to "object" can be for any GIS related applications
utilizing
those 2 new data types.
Original comment by chienhon...@gmail.com
on 18 Apr 2009 at 6:59
I filed this bug out of the discussion with CodeSmith team. Please see below
what
CodeSmith team sent me after couple rounds of email exchange:
"Could you please log this as a bug on the .netTiers bug tracker
(http://code.google.com/p/nettiers/). I just talked to a team member and we are
going to rewrite this code for creating the properties as it is in bad shape.
It
should be using a mapping file but isn't and updating the mapping file didn't
fix
the issue. You could manually update the following methods in the CommonSqlCode
in
the mean time (private string GetAliasName(string owner, string obj, string
item,
ReturnFields returnType, NameConversionType convertType))."
I hope this helps the NetTiers team to explore this issue. Thx.
Original comment by chienhon...@gmail.com
on 18 Apr 2009 at 7:03
Original comment by bniemyjski
on 25 May 2009 at 3:30
Hello,
This is something that will be fixed in 3.0. It will use a mapping file and the
user
will have to add the SQL2008 Types that map to Microsoft.SqlServer as we can't
assume
the users have that out of the box.
Thanks
-Blake
Original comment by bniemyjski
on 25 May 2009 at 4:08
Would it be possible to include the Microsoft.SqlServer.Types assembly in the
netTiers References folder? This would solve the problem of missing assemblies
at compile time if the geography/geometry types are used.
Original comment by livingst...@gmail.com
on 10 Jun 2010 at 3:05
Hello,
We could possibly do this, I'm not sure if there is anything to worry about
with the licensing of this assembly. If you want to create a patch for this
issue and include the assembly, I'll review it and commit it to core if
everything checks out.
Thanks
-Blake Niemyjski
Original comment by bniemyjski
on 10 Jun 2010 at 10:43
I have committed a partial solution, r881 – DbType.Time initialised with new
TimeSpan(1,0,0,0,0), and additional logic added to the input parameter builder
for the INSERT & UPDATE methods to cater for the SqlDbType.Time.
Original comment by xk...@yahoo.com
on 11 Feb 2011 at 2:09
Original issue reported on code.google.com by
chienhon...@gmail.com
on 17 Apr 2009 at 5:54Attachments: