简体   繁体   中英

Error 2019 when trying to build in C#

Someone wrote a program a few years ago and I have to modify it. While trying to build the code using .NET 4.5 the message:

Error 2019: Member Mapping specified is not valid. The type 
'Edm.DateTime[Nullable=False,DefaultValue=,Precision=]' of member 
'SRVC_EVNT_END_TM' in type 'SimModel.STR_SRVC_EVNT' is not compatible with 
'DB2.time[Nullable=False,DefaultValue=,Precision=0]' of member 
'SRVC_EVNT_END_TM' in type 'SimModel.Store.STR_SRVC_EVNT'. 
C:\Users\ponthcm\Documents\Visual Studio 2013\Applications\SIM.Entity\SimModel.edmx 5299 13 SIM.Entity

I talked to the programmer that wrote it and the only difference we could come up with while setting up the project is it was using Entity Framework 4 and I have Entity Framework 5 currently.

Besides that the only other possible problem I can see is that it is trying to put DateTime into Time because of the size difference. Any insight would be greatly appreciated.

The problem was that the IBM Dataserver Client addin for VS2010 was Version 10.5 and the code was written in Version 9.5. After the addin was uninstalled and installed using 9.5 the errors went away.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM