This is a migrated thread and some comments may be shown as answers.

2011Q1 "forgets" to map property datatype from table

5 Answers 89 Views
Design Time (Visual Designer & Tools)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Skywalker
Top achievements
Rank 1
Skywalker asked on 19 Mar 2011, 08:04 PM
*Please see below*

5 Answers, 1 is accepted

Sort by
0
Skywalker
Top achievements
Rank 1
answered on 19 Mar 2011, 08:09 PM
When I create a class from a table, the class properties use "Object" as a datatype, instead of mapping the datatypes from the table columns to .NET types on the created class. See attached screenshot for what I mean. You may also download a sample project demonstrating the issue here.
0
Skywalker
Top achievements
Rank 1
answered on 20 Mar 2011, 12:40 AM
I think I know what's going on: somehow 2011.Q1 doesn't support all of the MS SQL Server datatypes anymore.
In my "old" .rlinq" file for example, I used the "time" SQL Server datatype. But that type isn't shown anymore in the "Edit table..." dialog window, so I guess that's the reason OA mapped property types to "Object" because it doesn't know to map "time" to System.DateTime anymore.

Question: why doesn't OA support all of the SQL Server datatypes anymore, like "date", "time", "smallmoney" etc.?

Thanks,
Sipke
0
Skywalker
Top achievements
Rank 1
answered on 20 Mar 2011, 02:19 PM
I found out what was going on thanks to OA and the error list window: somehow the backend settings were not synchronized. When I doubleclicked that warning, OA allowed me to select the correct database server. After selecting MSSQL 2008, I am now able to use all of the SQL Server types. All is well :)
0
Accepted
Zoran
Telerik team
answered on 24 Mar 2011, 09:23 AM
Hi Skywalker,

 I apologize for the late response in this thread. I am happy that it all ended well in the end for you and you managed to resolve the problem yourself. However, if you manage to reproduce the scenario in which your model has no Backend set, please share the steps towards achieving that scenario. The idea is that we do not want to allow such workflow that would let the user have his model in such inconsistent state.  

All the best,
Zoran
the Telerik team
0
Skywalker
Top achievements
Rank 1
answered on 18 Apr 2011, 09:56 PM
Hi Zoran,

Sure thing, I will let you know what steps to take to reproduce the problem. Up until now I wasn't able to find out why it happens, but once I do I will update this thread. It may have something to do with selecting MSSQL2008 instead of MSSQL, but I'm not sure.

Thanks,
Skywalker
Tags
Design Time (Visual Designer & Tools)
Asked by
Skywalker
Top achievements
Rank 1
Answers by
Skywalker
Top achievements
Rank 1
Zoran
Telerik team
Share this question
or