CompiledQueryCache problems

CompiledQueryCache problems

Postby mepolsen » Fri 28 Oct 2011 18:30

I'm experiencing problems with queries being cached when they should not be. Here is one query that I'm getting the wrong results with:

IQueryable query = (from m in dataContext.Measids where m.HideState == hidden && array.Contains(m.DeviceId) select m);

var result = query.ToList();

where array is uint[]. I receive the same results whether the array is of size one or greater.

Here is the generated SQL if I run this query with three unique vaules in 'array':

SELECT t1.pk_measid, t1.k_test_type, t1.meas_datetime, t1.k_deviceid, t1.k_profile, t1.k_user, t1.temperature, t1.station_ID, t1.probe1_sn, t1.probe2_sn, t1.k_sweepid, t1.k_state, t1.state_name, t1.spar_cal_type, t1.hide_state, t1.bias_state_name, t1.info_name, t1.k_meas_info_details, t1.k_spar_cal_definition, t1.environment
FROM db_wb30_measdata.t_measid t1
WHERE (t1.hide_state = :p0) AND (t1.k_deviceid IN (:p1))

Does this mean I have to check the cache beforehand and then clear or remove the query if it exists?
mepolsen
 
Posts: 13
Joined: Mon 25 Oct 2010 19:14

Postby StanislavK » Tue 01 Nov 2011 12:20

Please specify the version of LinqConnect you are using. The similar errors occurred in previous builds of LinqConnect, but should be fixed in the latest 3.0.10 version:
http://www.devart.com/linqconnect/revision_history.html
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to LinqConnect (LINQ to SQL support)