Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
SQL
ce
clients
clustering
connect
datamining
datawarehouse
dts
fulltext
jdbcdriver
msde
mseq
newusers
notificationsvcs
odbc
olap
programming
replication
reportingsvcs
security
securitytools
server
setup
sqlxml.viewmapper
tools
xml
  
 
date: Fri, 8 Aug 2008 10:45:47 +0200,    group: microsoft.public.sqlserver.ce        back       


Problem in opening connection with SQLCE3.5   
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
date: Fri, 8 Aug 2008 10:45:47 +0200   author:   arnodieter

Re: Problem in opening connection with SQLCE3.5   
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.

"arnodieter"  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
>
>
date: Mon, 11 Aug 2008 11:02:54 -0700   author:   Paul G. Tobey [eMVP] p space tobey no spam AT no instrument no spam DOT com

Re: Problem in opening connection with SQLCE3.5   
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"  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
>
>
date: Mon, 11 Aug 2008 14:47:01 -0400   author:   Ginny Caughey MVP

Re: Problem in opening connection with SQLCE3.5   
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"  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"  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
>>
>> 
>
date: Tue, 12 Aug 2008 19:59:52 +0530   author:   Laxmi Narsimha Rao Oruganti [MSFT]

Re: Problem in opening connection with SQLCE3.5   
Thanks for the details, Laxmi!

-- 

Ginny Caughey
Device Application Development MVP


  "Laxmi Narsimha Rao Oruganti [MSFT]"  wrote in message news:eAD6nfI$IHA.3756@TK2MSFTNGP03.phx.gbl...
  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]
date: Tue, 12 Aug 2008 11:00:06 -0400   author:   Ginny Caughey MVP

Re: Problem in opening connection with SQLCE3.5   
Hello Ginny.

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

"Ginny Caughey MVP"  schrieb im 
Newsbeitrag 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"  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
>>
>>
>
date: Wed, 13 Aug 2008 08:48:24 +0200   author:   arnodieter

Re: Problem in opening connection with SQLCE3.5   
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

  "Laxmi Narsimha Rao Oruganti [MSFT]"  schrieb im Newsbeitrag news:eAD6nfI$IHA.3756@TK2MSFTNGP03.phx.gbl...
  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"  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"  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
  >>
  >> 
  >
date: Wed, 13 Aug 2008 08:52:57 +0200   author:   arnodieter

Re: Problem in opening connection with SQLCE3.5   
The question why there is a timeout property which is readonly and defaults 
to 0 is still not answered!?

Kind regards

"arnodieter"  schrieb im Newsbeitrag 
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
>
>
date: Wed, 13 Aug 2008 08:55:12 +0200   author:   arnodieter

Re: Problem in opening connection with SQLCE3.5   
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

"arnodieter"  wrote in message 
news:g7u0gh$gsg$03$1@news.t-online.com...
> The question why there is a timeout property which is readonly and 
> defaults to 0 is still not answered!?
>
> Kind regards
>
> "arnodieter"  schrieb im Newsbeitrag 
> 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
>>
>>
>
>
date: Wed, 13 Aug 2008 17:29:33 +0530   author:   Laxmi Narsimha Rao Oruganti [MSFT]

Re: Problem in opening connection with SQLCE3.5   
Ok that's an argument.

Thanks.

"Laxmi Narsimha Rao Oruganti [MSFT]"  schrieb im 
Newsbeitrag news:O42kOwT$IHA.2060@TK2MSFTNGP05.phx.gbl...
> 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
>
> "arnodieter"  wrote in message 
> news:g7u0gh$gsg$03$1@news.t-online.com...
>> The question why there is a timeout property which is readonly and 
>> defaults to 0 is still not answered!?
>>
>> Kind regards
>>
>> "arnodieter"  schrieb im Newsbeitrag 
>> 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
>>>
>>>
>>
>>
>
>
date: Wed, 13 Aug 2008 16:16:02 +0200   author:   arnodieter

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us