Search found 43 matches

by [email protected]
Thu 25 Mar 2010 16:36
Forum: LinqConnect (LINQ to SQL support)
Topic: Error with multiple LoadWith
Replies: 12
Views: 5318

Hello

Thank you for the pre-release build. The problem with multiple LoadWith() is now fixed.
But I have now two other problems.

The following statement gives an error:

Code: Select all

var recordSet = from m in PPCustomer.Movies
							where m.AssetId == AssetId
							orderby m.MovieId
							select m;

			foreach (var movie in recordSet)
			{
			...
			}
With local VS debugging session:

Object reference not set to an instance of an object.

at Devart.Data.Linq.Provider.ObjectReader`1.e()
at Devart.Data.Linq.Provider.ObjectReader`1.MoveNext()

Deployed on Server:

Object reference not set to an instance of an object.

at Devart.Data.Linq.Provider.ObjectReader`1.e()
at Devart.Data.Linq.Provider.ObjectReader`1.Dispose()


If I change the statement and call ToList() it is working.

Code: Select all

var recordSet = (from m in PPCustomer.Movies
							where m.AssetId == AssetId
							orderby m.MovieId
							select m).ToList();


The other problem seems to be a multi-threading issue:

Cannot access a disposed object. Object name: 'DataContext accessed after Dispose.'.

at Devart.Data.Linq.DataContext.b()
at Devart.Data.Linq.DataContext.e()
at Devart.Data.Linq.Provider.DeferredQuery`3.a(TKeyQuery A_0)
at Devart.Data.Linq.Provider.DeferredSource`2.b()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at lambda_method(ExecutionScope , f )
at Devart.Data.Linq.Provider.ObjectReader`1.g()
at Devart.Data.Linq.Provider.ObjectReader`1.b()
at Devart.Data.Linq.Provider.ObjectReader`1.MoveNext()

Here is the example code. This exception happens only a few times.

Code: Select all

var recordSet = (from m in PPCustomer.Mailings.LoadWith(m => m.User).LoadWith(u => u.MailingRecipients)
				 join u in PPCustomer.Users on m.CreatedByUserId equals u.UserId
				 join mr in PPCustomer.MailingRecipients on m.MailingId equals mr.MailingId
				 join sq in PPCustomer.Users on mr.UserId equals sq.UserId into lj
				 from u2 in lj.DefaultIfEmpty()
				 select new
				 {
					 MailingId = m.MailingId,
					 CreationDate = m.CreationDate,
					 EmailAddress = u.EmailAddress,
					 RecipientEmailAddresses = m.MailingRecipients.Where(mrts => mrts.MailingId == m.MailingId),
					 Subject = m.Subject,
					 State = m.Deleted ? (int)MailingState.Deleted : (m.ExpirationDate  mailingListItem = new List();
foreach (var record in recordSet)
{
...
}
Thanks for your help
________
Bond Insurance Dicussion
by [email protected]
Thu 18 Mar 2010 14:50
Forum: LinqConnect (LINQ to SQL support)
Topic: Error with multiple LoadWith
Replies: 12
Views: 5318

Hi. Could you send me a pre-release of your build in order to be able to test the fixed feature? In case we detect other issues we could quickly report you other problems before you release this build. This will save some time.

Thank you and best regards
________
Motorcycle tires
by [email protected]
Wed 17 Mar 2010 07:03
Forum: LinqConnect (LINQ to SQL support)
Topic: Error with multiple LoadWith
Replies: 12
Views: 5318

Hi

When do you plan to release your current build? We need it as soon as possible.

Thank you very much and best regards
________
G Engine
by [email protected]
Mon 15 Mar 2010 16:21
Forum: LinqConnect (LINQ to SQL support)
Topic: Error with multiple LoadWith
Replies: 12
Views: 5318

Hello

Is it possible to deliver us an immediate build with this fix? This is a very urgent problem for us. There was already another LINQ2SQL issue which caused a delay on our side. Therefore we'd be very happy to get the new fix as fast as possible. Thank you very much.

Kind regards
________
Angelina jolie pictures
by [email protected]
Thu 04 Mar 2010 12:46
Forum: LinqConnect (LINQ to SQL support)
Topic: Error with multiple LoadWith
Replies: 12
Views: 5318

Hello

I just updated to the new 5.70.102 Beta.
Now I get another error when loading Data with multiple LoadWith() statements defined.

DataTableReader is invalid for current DataTable ''.

at System.Data.DataTableReader.ValidateState(String caller)
at System.Data.DataTableReader.IsDBNull(Int32 ordinal)
at Devart.Data.Linq.Provider.ObjectReader`1.CaheReader.IsDBNull(Int32 i)
at lambda_method(ExecutionScope , f )
at Devart.Data.Linq.Mapping.l.Accessor`2.a(T A_0)
at System.Data.Linq.Mapping.MetaAccessor`2.GetBoxedValue(Object instance)
at Devart.Data.Linq.Provider.JoinedEntityReader`6.a(f A_0)
at Devart.Data.Linq.Provider.JoinedEntityReader`6.c()
at Devart.Data.Linq.Provider.JoinedEntityReader`6.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
________
MOTORCYCLE TIRES
by [email protected]
Tue 23 Feb 2010 08:41
Forum: LinqConnect (LINQ to SQL support)
Topic: Error with multiple LoadWith
Replies: 12
Views: 5318

Error with multiple LoadWith

Hello

I just installed the new beta version (5.70.97) to test the "Cannot access a disposed object" fix.

Now i get another error with LINQ statements having more than one LoadWith() defined. This worked before with 5.40.44.

Example:
var versionTypes = from vt in PPCustomer.VersionTypes.LoadWith(i => i.VersionTypeTranslations).LoadWith(i => i.VersionOptions.LoadWith(j => j.VersionOptionTranslations))
where vt.Enabled == true
orderby vt.SortOrder
select vt;

The error:
Object reference not set to an instance of an object.

Stack:
at Devart.Data.Linq.Provider.ObjectReader`1.c()
at Devart.Data.Linq.Provider.ObjectReader`1.k()
at Devart.Data.Linq.Provider.ConnectionManager.a(IDbConnection A_0)
at Devart.Data.Linq.Provider.ConnectionManager.GetOpenConnection()
at Devart.Data.Linq.Provider.ConnectionManager.b(IConnectionUser A_0)
at Devart.Data.Linq.Provider.DataProvider.a(b A_0, Object[] A_1, Object[] A_2, Object A_3)
at Devart.Data.Linq.Provider.DataProvider.a(b A_0, Object[] A_1)
at Devart.Data.Linq.Provider.DataProvider.b.a(b A_0, Object[] A_1)
at Devart.Data.Linq.Provider.DeferredQuery`3.a(TKeyQuery A_0)
at Devart.Data.Linq.Provider.DeferredSource`2.b()
at Devart.Data.Linq.Provider.DeferredSource`2.a()
at Devart.Data.Linq.ListEnumerable`1.b()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at System.Data.Linq.EntitySet`1.AddRange(IEnumerable`1 collection)
at Devart.Data.Linq.Mapping.EntitySetValueAccessor`2.a(Object& A_0, Object A_1)
at Devart.Data.Linq.Provider.h.SetLinks[TEntity,TCacheEntity,TKey](TEntity obj, MetaType objMetaType, Object keySource, IList`1 linkMembers, q services, IList`1 queryLoadWith, Dictionary`2 nextLoadWiths, Boolean deferredLoadingEnabled)
at lambda_method(ExecutionScope , f )
at Devart.Data.Linq.Provider.JoinedEntityReader`6.c()
at Devart.Data.Linq.Provider.JoinedEntityReader`6.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)


Thanks for your help
________
Goddess Worship Dicussion
by [email protected]
Thu 04 Feb 2010 10:34
Forum: LinqConnect (LINQ to SQL support)
Topic: Keep getting exception after some time of running
Replies: 12
Views: 4002

Hello

We have the same problem on our production server. It currently happens about 50 times a day.

In my case, i think it has to do with Multi-Threading. Because our Application runs as a WCF Service, a lot of requests can happen at the same time.

I created a Test-Case using a Background-Worker. There I can sometimes reproduce the Problem. It does not happen every time i start a debug session. Sometimes I need about 10 attempts until the error occurs.

The Test-Project can be downloaded here:
http://www.yousendit.com/download/S1VEa ... M21Ga1E9PQ

Thanks for your help, how we can fix this problem.
________
NEW JERSEY MARIJUANA DISPENSARY
by [email protected]
Mon 02 Nov 2009 10:19
Forum: LinqConnect (LINQ to SQL support)
Topic: LoadWith()
Replies: 1
Views: 1995

LoadWith()

Hello

I have the following query:

Code: Select all

from rc in MyDB.ReplicationCategories.LoadWith(rc => rc.Category)
select rc;
Each ReplicationCategory references exactly one Category which will be also loaded with the above query.

So far so good. Now, each category has n translations which I would like to load too:

Code: Select all

from rc in MyDB.ReplicationCategories.LoadWith(rc => rc.Category.LoadWith(c => c.CategoryTranslations))
select rc;
Unfortunately I got the error message "Category does not contain a definition for 'LoadWith'". Why isn't this method exposed there?

Best regards
________
STARCRAFT II REPLAYS
by [email protected]
Tue 22 Sep 2009 11:46
Forum: dotConnect for MySQL
Topic: Lost connection to MySQL server during query
Replies: 23
Views: 14408

Hello

Thank you for this workaround. Indeed this will decrease the performance.

You say, the pooling manager validates the connections in the pool every 60 seconds itself. Are you sure this is working? In our live environment we have a wait_timeout of 28800 (default). I just decreased this value to quickly reproduce the "lost connection to mysql server" error.

Do you think I just created a "new" error with my test but did not reproduce the same error we experience in our live environment?

Regards
________
by [email protected]
Tue 22 Sep 2009 07:45
Forum: dotConnect for MySQL
Topic: Lost connection to MySQL server during query
Replies: 23
Views: 14408

Hi

Do you need some more information from my side to accelerate the problem analysis? Please let me know.

Best regards
________
by [email protected]
Mon 21 Sep 2009 08:08
Forum: dotConnect for MySQL
Topic: Lost connection to MySQL server during query
Replies: 23
Views: 14408

Hi

Were you able to reproduce this bug? We urgently need a solution. Thank you very much for your help.

Best regards
________
by [email protected]
Fri 18 Sep 2009 09:38
Forum: dotConnect for MySQL
Topic: Lost connection to MySQL server during query
Replies: 23
Views: 14408

Please use the following sample to reproduce this behaviour. Please also note the TODOs.

Code: Select all

using System;
using System.Collections.Generic;
using System.Data.Linq;
using System.Linq;
using System.Linq.Expressions;
using Devart.Data.Linq;
using System.Threading;

namespace DevartTest
{
	class Program
	{
		static void Main(string[] args)
		{
			// TODO:
			// - Set the wait_timeout of the MySql instance to 20 seconds
			// - Adjust the connection string
			// - Create a DataContext from any table and use this table for the query

			Console.WriteLine("Creates a connection on the MySql instance");
			Run();

			Console.WriteLine("Waits 10 seconds");
			Thread.Sleep(10*1000);

			Console.WriteLine("Reuses the connection on the MySql instance and resets its idle time back to 0");
			Run();

			Console.WriteLine("Waits 25 seconds until the connection gets killed on the MySql server");
			Thread.Sleep(25 * 1000);

			Console.WriteLine("Tries to reuse the connection on the MySql instance (instead of creating a new one) which throws a \"Lost connection to MySQL server during query\" error");
			Run();

			Thread.Sleep(60 * 1000);
		}

		static void Run()
		{
			try
			{
				DB db = new DB("Server=MyServer;Port=3306;Database=MyDatabase;User=MyUser;Password=MyPassword;Persist Security Info=false;Unicode=true;Pooling=true;Min Pool Size=0;Max Pool Size=100;Connection Lifetime=0;Connection Timeout=15;Compress=false;Protocol=tcp;Direct=true;Embedded=false");
				db.DeferredLoadingEnabled = false;

				var records = (from t in db.MyTable
							 select t).ToList();
			}
			catch (Exception ex)
			{
				Console.WriteLine();
				Console.WriteLine(ex.ToString());
			}
		}
	}
}
________
by [email protected]
Wed 16 Sep 2009 14:16
Forum: dotConnect for MySQL
Topic: Lost connection to MySQL server during query
Replies: 23
Views: 14408

Is there anything else we can do to help you to find the source of this bug as fast as possible?
by [email protected]
Tue 15 Sep 2009 08:57
Forum: dotConnect for MySQL
Topic: Lost connection to MySQL server during query
Replies: 23
Views: 14408

Hello

We tried to disable pooling. Indeed this helped. But performance was so bad than, that we had to enable it again. The connection string of the SessionStateProvider looks as follows:

Code: Select all

Server=xyz;Port=3306;Database=xyz;User=xyz;Password=xyz;Persist Security Info=false;Unicode=true;Pooling=true;Min Pool Size=0;Max Pool Size=1000;Connection Lifetime=0;Connection Timeout=60;Compress=false;Protocol=tcp;Direct=true;Embedded=false
We are running over 100 databases. We get stack traces like this every day:

Lost connection to MySQL during query
at Devart.Data.MySql.ba.d(Exception A_0)
at Devart.Common.u.e(Byte[] A_0, Int32 A_1, Int32 A_2)
at Devart.Data.MySql.bd.d(Byte[] A_0, Int32 A_1, Int32 A_2)
at Devart.Data.MySql.bd.l()
at Devart.Data.MySql.s.a(g A_0, Byte[] A_1, Int32 A_2, Boolean A_3)
at Devart.Data.MySql.s.a(Byte[] A_0, Int32 A_1, Boolean A_2)
at Devart.Data.MySql.av.e()
at Devart.Data.MySql.MySqlCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at Devart.Common.DbCommandBase.ExecuteNonQuery()
at Devart.Data.MySql.MySqlConnection.i()
at Devart.Data.MySql.MySqlConnection.Open()
at Devart.Data.Linq.Provider.ConnectionManager.GetOpenConnection()
at Devart.Data.Linq.Provider.ConnectionManager.b(IConnectionUser A_0)
at Devart.Data.Linq.Provider.DataProvider.a(d A_0, f A_1, Object[] A_2, Object[] A_3, Object A_4)
at Devart.Data.Linq.Provider.DataProvider.a(d A_0, Object[] A_1)
at Devart.Data.Linq.DataQuery`1.i()

We urgently need your help to track down this problem.

Best regards
Thomas
________
by [email protected]
Fri 29 May 2009 11:20
Forum: dotConnect for MySQL
Topic: LoadOptions cannot be changed
Replies: 16
Views: 5818

Perfect. I'm looking forward to your next beta release.
________
LAOS RECIPES