command Timeout Exception

Posts   
 
    
BEDN
User
Posts: 14
Joined: 31-Jan-2007
# Posted on: 31-Jan-2007 09:11:26   

Hello everybody.

I'm having some problem with LLBLGen and SQLCE.
I Keep getting an exception 'TIMEOUT Exception' in the following block of code


            EntityCollection<VehicleEntity> ColVehicleEnt = new EntityCollection<VehicleEntity>(new VehicleEntityFactory());

            VehicleEntity oVeh = new VehicleEntity();
            IRelationPredicateBucket vBucket = new RelationPredicateBucket();
            vBucket.PredicateExpression.Add (VehicleFields.MacadamId == txtVehicle.Text);
            DataAccessAdapter oDa = new DataAccessAdapter(XiparoRoot.LocalDBConnectionString );
            oDa.CommandTimeOut = 0;
            
            oDa.FetchEntityCollection(ColVehicleEnt,vBucket );
            oDa.Dispose();


The LocalDBConnectionString is path & "\file.sdf"

The Error occurs on the FetchEntityCollection

How can i fix this problem?

TIA

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 31-Jan-2007 10:03:32   

Setting it to 0 has no effect, you have to specify a value or leave it to 30 seconds. Though, how many entities are you fetching? Other actions on the database work? (e.g. fetching 1 entity)

Frans Bouma | Lead developer LLBLGen Pro
BEDN
User
Posts: 14
Joined: 31-Jan-2007
# Posted on: 31-Jan-2007 10:06:43   

Otis,

Thanx for the quick response,

I'm fetching 1 entity, as the MacadamID i'm fetching is unique, but not the PK of the table.

I tried to set the timout already. There are no other actions running on the database.

BEDN

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 31-Jan-2007 10:49:05   

If one entity already gives a timeout, perhaps the db file is locked? (i.e. it can't be opened because you've also sqlanalyzer open ? )

Frans Bouma | Lead developer LLBLGen Pro
BEDN
User
Posts: 14
Joined: 31-Jan-2007
# Posted on: 31-Jan-2007 10:57:04   

The DB file is not locked. I did check that first because it was also my first tought.

is it perhaps something with my connectionstring @"data source=" + AppPath + @"\Xiparo.sdf"

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 31-Jan-2007 11:16:24   

BEDN wrote:

The DB file is not locked. I did check that first because it was also my first tought.

is it perhaps something with my connectionstring @"data source=" + AppPath + @"\Xiparo.sdf"

depends on what AppPath is of course. I use: string connectionString = @"data source=\My Documents\Northwind2.sdf"; which works ok.

Frans Bouma | Lead developer LLBLGen Pro
BEDN
User
Posts: 14
Joined: 31-Jan-2007
# Posted on: 31-Jan-2007 11:38:40   

Do i have to do something special to my sdf file??

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 31-Jan-2007 11:41:24   

BEDN wrote:

Do i have to do something special to my sdf file??

Not that I know of... are you able to open the db in the CE query analyzer/management tool on the device and run a query on it?

Frans Bouma | Lead developer LLBLGen Pro
BEDN
User
Posts: 14
Joined: 31-Jan-2007
# Posted on: 31-Jan-2007 11:43:28   

Yes i can,

I did the test with a normal SQL Ce Querry which works fine.

I even tested the small program on 2 different Symbol MC 50 PDA's.

BEDN
User
Posts: 14
Joined: 31-Jan-2007
# Posted on: 31-Jan-2007 13:49:11   

Maybe this can help us out a bit

the stacktrace :


at System.Data.SqlServerCe.SqlCeCommand.set_CommandTimeout()
at SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine.CreateCommand()
at SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine.CreateSelectDQ()
at SD.LLBLGen.Pro.ORMSupportClasses.DynamicQueryEngineBase.CreateSelectDQ()
at SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine.CreatePagingSelectDQ()
at SD.LLBLGen.Pro.ORMSupportClasses.DynamicQueryEngineBase.CreateSelectDQ()
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.CreateSelectDQ()
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityUsingFilter()
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntity()
at Xiparo.Form1.button1_Click_1()
at System.Windows.Forms.Control.OnClick()
at System.Windows.Forms.Button.OnClick()
at System.Windows.Forms.ButtonBase.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterMainLoop()
at System.Windows.Forms.Application.Run()
at Xiparo.Program.Main()

thia

BEDN
User
Posts: 14
Joined: 31-Jan-2007
# Posted on: 31-Jan-2007 14:41:25   

Addition on Stacktrace exceptoin posted Before.

the PDA displays NotSupportedException

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 31-Jan-2007 14:53:26   

Upgrade to the latest runtimes, this issue has been fixed for some time. (the timeout set issue in the SQLServer CE DQE)

Frans Bouma | Lead developer LLBLGen Pro
BEDN
User
Posts: 14
Joined: 31-Jan-2007
# Posted on: 31-Jan-2007 14:58:06   

Can find it where

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 31-Jan-2007 15:10:35   

You must be logged in: www.llblgen.com -> at the top of the page -> customerid + password -> Customer area

BEDN
User
Posts: 14
Joined: 31-Jan-2007
# Posted on: 31-Jan-2007 15:42:52   

TX a million Heaven opens before my eyes