I have a .Net application running on Windows Mobile 6.5 It starts with an empty database (SQL Anywhere After performing a full sync the database on the mobile device is filled and the application works. But when I perform a second full sync, close the app and restart it, I get following error when the app want's to connect with the database.


   at iAnywhere.Data.SQLAnywhere.SAInternalConnection.CheckException(Int32 idEx, Boolean freeConn)
   at iAnywhere.Data.SQLAnywhere.SAInternalConnection.OpenConnection()
   at iAnywhere.Data.SQLAnywhere.SAInternalConnection..ctor(SAConnection parent, Boolean pooled, Object dtcTran, String connectionString, SAConnectionGroup connectionGroup)
   at iAnywhere.Data.SQLAnywhere.SAConnectionPool..ctor(String connectionString, Hashtable connectionOption)
   at iAnywhere.Data.SQLAnywhere.SAConnectionPoolManager.AllocateConnection(SAConnection parent, Object dtcTran, String connectionString, Hashtable connectionOptions)
   at iAnywhere.Data.SQLAnywhere.SAConnection.Open()
   at Jdn.ApplicationBlocks.Data.DBHandler.PrepareConnection(String sqlName, Dictionary`2 inputParameters, Dictionary`2 outputParameters)
   at Jdn.ApplicationBlocks.Data.DBHandler.ExecuteReader(String sqlName, Dictionary`2 inputParameters, Dictionary`2 outputParameters)
   at Jdn.Fwk.Data.UnTypedDataHandler.ExecuteReader(JdnDataParameterCollection parameter)
   at Jdn.Fwk.Business.BusinessController.Load[T](JdnParameterCollection parameters)
   at Jdn.AmosCompact.Business.Database.Setting.GetSettings()
   at Jdn.Amos.AmosMobile.ModGlobals.GetParamValues()
   at Jdn.Amos.AmosMobile.StartUp.Main()

Jdn assembly is the application.

The connectionstring is "DBF=Storage CardDatabaseamosmobile.db;UID=dba;PWD=sql"

Filesize of DB and Log-file are about 30-40M

If I copy database from mobile device to a pc, I can open it with sybase central.

asked 17 Apr '12, 08:08

saegerman's gravatar image

accept rate: 0%

edited 15 Mar '13, 19:51

Mark%20Culp's gravatar image

Mark Culp

.NET can debug C# applications, even on a device. If you launch the project in Debug mode on the device, can you see the stack trace? If so, what is the ".Message" value inside the SAException object?

Can you add a "LOG=logfile.txt" to your connection string and check the outfile for connection / database server start up issues?

If you add a "START=\Program Files\SQLANY11\dbsrv11.exe -z -o \dbsrv11.txt" parameter to your connection string, what messages appear in the server console log when you try to connect from your application?

(17 Apr '12, 15:27) Jeff Albion

The log-file contains this:

Wed Apr 18 2012 10:21:59
10:21:59 Attempting to connect using:
  UID=dba;PWD=********;DBF='\Storage Card\Database\amosmobile.db';
  LOG='\Storage Card\logfile.txt';PROWS=200
10:21:59 Attempting to connect to a running server...
10:21:59 Trying to start SharedMemory link ...
10:21:59     SharedMemory link started successfully
10:21:59 Attempting SharedMemory connection (no sasrv.ini cached address)
10:21:59 Failed to connect over SharedMemory
10:21:59 No server found, attempting to start a personal server...
10:22:02 Failed to autostart server
10:22:02 Attempting SharedMemory connection (no sasrv.ini cached address)
10:22:02 Failed to connect over SharedMemory
10:22:02 Cannot connect to server
(18 Apr '12, 04:17) saegerman

dbsrv11.txt contains following:

I. 04/19 08:35:09. 1: -z I. 04/19 08:35:09. 2: -o I. 04/19 08:35:09. 3: dbsrv11.txt I. 04/19 08:35:09. 4: -ha I. 04/19 08:35:09. 5: -ga I. 04/19 08:35:09. 6: Storage CardDatabaseamosmobile.db I. 04/19 08:35:09. 7: -hn0,2922449646:4020672542 I. 04/19 08:35:09. I. 04/19 08:35:09. SQL Anywhere Network Server Version I. 04/19 08:35:09. Workgroup edition I. 04/19 08:35:09. I. 04/19 08:35:09. Copyright © 2001-2009, iAnywhere Solutions, Inc. I. 04/19 08:35:09. Portions copyright © 1988-2009, Sybase, Inc. All rights reserved. I. 04/19 08:35:09. Use of this software is governed by the Sybase License Agreement. Refer to http://www.sybase.com/softwarelicenses I. 04/19 08:35:09. I. 04/19 08:35:09. 1 physical processor(s) detected. I. 04/19 08:35:09. Processor limit (Workgroup Edition): 2 I. 04/19 08:35:09. Processor limit (licensed processors): 2 I. 04/19 08:35:09. Maximum number of physical processors the server will use: 1 I. 04/19 08:35:09. This server is licensed to: I. 04/19 08:35:09. Developper I. 04/19 08:35:09. Jan De Nul Dredging NV I. 04/19 08:35:09. Running Windows CE 5.2 Build 23137 on ARM I. 04/19 08:35:10. Server built for ARM processor architecture E. 04/19 08:35:10. Not enough memory

So a memory problem occurs...

(19 Apr '12, 02:32) saegerman

I used parameter START=Program FilesSQLANY11dbsrv11.exe -c 40p -ca 0 -z -o dbsrv11.txt and now the application starts again.

permanent link

answered 19 Apr '12, 02:57

saegerman's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 17 Apr '12, 08:08

question was seen: 2,963 times

last updated: 15 Mar '13, 19:51