Linq to SQL Azure genrating Error "Specified cast is not valid."
Posted
by Rabbi
on Stack Overflow
See other posts from Stack Overflow
or by Rabbi
Published on 2010-04-04T05:16:41Z
Indexed on
2010/04/04
5:23 UTC
Read the original article
Hit count: 366
B"H
I have an application that has been working for months using Linq to SQL connecting to a SQLExpress. I tried migrating it to SQL Azure. I copied the structure and data using the Sync Framework. I viewed the data in SQL Azure using SSMS 2008 R2 and it seams to be exactly what I have in my Sql Server.
However when I try to use Linq to SQL against it I get an error "Specified cast is not valid."
I seams to be happening any time I get child records. i.e. whenever I fill (the first time I access) an entity set. It seams to be happening after the data returns and when Linq tries to put it into the objects.
remember, the application is working perfectly against sqlexpress, even when accessed across the internet or vpn.
© Stack Overflow or respective owner