Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Specified cast is not valid in Linq?

$
0
0

Hi,

these is Database Structure

TimeSheetId    int               Unchecked
ReserveID        int               Unchecked
LoginTime        datetime      Checked
LogoutTime      datetime     Checked
Day                                     Checked
Hour                                   Unchecked
       

first i bind normally , its work properlly

but i formulate Hour Field like

(CONVERT([nvarchar](52),[LogoutTime]-[LoginTime],(108)))

its giving a error :

Specified cast is not valid.]

while i refresh the table from server explorer and again drag and drop it

thanks


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>