tags:

views:

104

answers:

1

I'm trying to get my program to use a LocalDataCache. I'm using Linq.

if (tempVehicle.VehicleFinancialInfo[0].askingPrice != null)
{
    // do stuff
}

askingPrice is a (decimal?) because VehicleFinancialInfo is a linq entityset.

The above if test works on SQL Express but it crashes the app in SQL Compact Edition. It gives the error "Specified Cast is not valid". Does anyone know what's going on. I need the program to work with both express and compact edition. Be gentle, I'm a noob to SQL and Linq

A: 

Oops.. When the LocalDataCache wizard created the .sdf database, it created the datetime columns as nchar... Thanks Stan R.