Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server CE / August 2008

Tip: Looking for answers? Try searching our database.

Problem in opening connection with SQLCE3.5

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
arnodieter - 08 Aug 2008 09:45 GMT
I've written an application for inventory and price enquiry. The application
is written in c# using VS2008, .NetCF2.0 and SQLCE3.5. The device where the
application must run is a Symbol/Motorola MC1000 which has very poor
performance and very little memory.
Sometimes the connection doesn't open. It seems to me, that the device is
"swapping memory" and therefor needs longer than the sqlce-server aspects.
- Who can I workaround these problems?
- Why is the timeout-property of the connection read-only and defaults to
"0"?

Thanks in advance
Paul G. Tobey [eMVP] - 11 Aug 2008 19:02 GMT
When the connection fails to open, actually examine the exception that is
thrown by the Open operation and see what that's telling you.  There's no
good reason to believe, based on what you've told us, that a timeout is
happening.

If there's no memory, nothing other than using less memory is going to help.
You could dump the .NET CF and write C/C++ code using OLE DB, I think,
although I've never done that.  You could try adjusting the Memory settings
on the Memory Control Panel applet for the device to give more memory to the
programs and less for storage.  You could stop running some of the programs
that you have running.

There's little or not swapping going on.  Windows CE does not support a
'paging' file, so no data is *ever* swapped out.

Paul T.

> I've written an application for inventory and price enquiry. The
> application is written in c# using VS2008, .NetCF2.0 and SQLCE3.5. The
[quoted text clipped - 7 lines]
>
> Thanks in advance
Ginny Caughey MVP - 11 Aug 2008 19:47 GMT
Have you tried setting Connect Timeout=500 or some such in the connection
string? Does that make any difference?

Signature

Ginny Caughey
Device Application Development MVP

> I've written an application for inventory and price enquiry. The
> application is written in c# using VS2008, .NetCF2.0 and SQLCE3.5. The
[quoted text clipped - 7 lines]
>
> Thanks in advance
Laxmi Narsimha Rao Oruganti [MSFT] - 12 Aug 2008 15:29 GMT
There is no concept of ConnectTimeout and QueryTimeout with SQL CE.  If at all they are parsed, they are parsed and ignored as these timeout business is when client has to wait for server's response.  In case of SQLCE, connecting and querying is just another function call and so timeouts do not matter.

So we have to rule out timeout possibility.  Now coming to on what and all could be the reason why a connectino could fail are:
1) Connection String information is wrong - SqlCeException should contain the exact details of what is wrong
2) Not enough memory to load all the engine in memory.  Please refer to blog articles: (Link1, Link2)

Thanks,
Laxmi  [Disclaimer: All postings are as-is and confer no rights]

> Have you tried setting Connect Timeout=500 or some such in the connection
> string? Does that make any difference?
[quoted text clipped - 10 lines]
>>
>> Thanks in advance
Ginny Caughey MVP - 12 Aug 2008 16:00 GMT
Thanks for the details, Laxmi!

Signature

Ginny Caughey
Device Application Development MVP

 There is no concept of ConnectTimeout and QueryTimeout with SQL CE.  If at all they are parsed, they are parsed and ignored as these timeout business is when client has to wait for server's response.  In case of SQLCE, connecting and querying is just another function call and so timeouts do not matter.

 So we have to rule out timeout possibility.  Now coming to on what and all could be the reason why a connectino could fail are:
 1) Connection String information is wrong - SqlCeException should contain the exact details of what is wrong
 2) Not enough memory to load all the engine in memory.  Please refer to blog articles: (Link1, Link2)

 Thanks,
 Laxmi  [Disclaimer: All postings are as-is and confer no rights]
arnodieter - 13 Aug 2008 07:52 GMT
Thanks for the tips.
The solution was 2) Not enough memory. I've installed an additional memory card and the application is also installed on the memory card. Now the problem is solved.
But I'm still wondering why there isn't a useful error message from the .NETCF or the SQLCE and why the error occured only sometimes.

Regards

 There is no concept of ConnectTimeout and QueryTimeout with SQL CE.  If at all they are parsed, they are parsed and ignored as these timeout business is when client has to wait for server's response.  In case of SQLCE, connecting and querying is just another function call and so timeouts do not matter.

 So we have to rule out timeout possibility.  Now coming to on what and all could be the reason why a connectino could fail are:
 1) Connection String information is wrong - SqlCeException should contain the exact details of what is wrong
 2) Not enough memory to load all the engine in memory.  Please refer to blog articles: (Link1, Link2)

 Thanks,
 Laxmi  [Disclaimer: All postings are as-is and confer no rights]

 "Ginny Caughey MVP" <ginny.caughey.online@wasteworks.com> wrote in message news:OHpsOK%23%23IHA.4772@TK2MSFTNGP06.phx.gbl...
 > Have you tried setting Connect Timeout=500 or some such in the connection
 > string? Does that make any difference?
 >
 > --
 >
 > Ginny Caughey
 > Device Application Development MVP
 >
 >
 > "arnodieter" <arnodieter@gmx.de> wrote in message
 > news:g7h13j$isr$03$1@news.t-online.com...
 >> I've written an application for inventory and price enquiry. The
 >> application is written in c# using VS2008, .NetCF2.0 and SQLCE3.5. The
 >> device where the application must run is a Symbol/Motorola MC1000 which
 >> has very poor performance and very little memory.
 >> Sometimes the connection doesn't open. It seems to me, that the device is
 >> "swapping memory" and therefor needs longer than the sqlce-server aspects.
 >> - Who can I workaround these problems?
 >> - Why is the timeout-property of the connection read-only and defaults to
 >> "0"?
 >>
 >> Thanks in advance
 >>
 >>
 >
arnodieter - 13 Aug 2008 07:48 GMT
Hello Ginny.

As you should remember: timeout property is readonly...

> Have you tried setting Connect Timeout=500 or some such in the connection
> string? Does that make any difference?
[quoted text clipped - 11 lines]
>>
>> Thanks in advance
arnodieter - 13 Aug 2008 07:55 GMT
The question why there is a timeout property which is readonly and defaults
to 0 is still not answered!?

Kind regards

> I've written an application for inventory and price enquiry. The
> application is written in c# using VS2008, .NetCF2.0 and SQLCE3.5. The
[quoted text clipped - 7 lines]
>
> Thanks in advance
Laxmi Narsimha Rao Oruganti [MSFT] - 13 Aug 2008 12:59 GMT
Oh well, I thought I answered it implicitly in my reply. Anyways, it is
there just for ADO.NET Compliance and nothing more.  Since everyone derives
from Db* base classes and ConnectTimeout is abstract virtual, we had to
override to compile the code.  We did it and also made sure to avoid
applications depending on it by returning zero.  Let us not debate on why it
should not have been throwing an exception than zero.

Thanks,
Laxmi

> The question why there is a timeout property which is readonly and
> defaults to 0 is still not answered!?
[quoted text clipped - 13 lines]
>>
>> Thanks in advance
arnodieter - 13 Aug 2008 15:16 GMT
Ok that's an argument.

Thanks.

> Oh well, I thought I answered it implicitly in my reply. Anyways, it is
> there just for ADO.NET Compliance and nothing more.  Since everyone
[quoted text clipped - 23 lines]
>>>
>>> Thanks in advance
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.