Perormance and..Help

  • Thread starter Thread starter Freeman
  • Start date Start date
F

Freeman

Hi all,
I'd be glad if you answer my questions below.

1- Which one should I choose when I start SmartDevice application within
VS.NET; PocketPC or Wince.NET? I want both platforms to be supported. Or
which one will be in favour in the future? For example, the ones I have
coded with PocketPC works with both devices. And I wonder if it will work
with Wince.NET?! What is the main difference between them?

2- It gets very slow when I enter the other forms after running 5000 records
as Commandtext="INSERT INTO.. " Cmd.ExecuteNonQuery in SQLce database. I
also get "insufficient memory" message. Why? Or should I use Parametric
Query?

3- For memory management. Is it enough executing Dispose after closing the
Forms I runned as -App.Run(new Form() ) ?

Last one:
4- when using SQLce Connection feature in SmartDevice application, should I
turn it on and off on each process OR is turning it on once when the main
application starts better? Which one is better?

Thanks to everyone!
 
1. Read this:
http://blogs.msdn.com/marcpe/archive/2005/04/22/410778.aspx
If you are targeting PPC use PPC template and if you are targeting custom
wince device use the wince template. On the very remote chance that your
single project has to work for both (I doubt it), start with a wince
template so you can get the wince device in the deployment dropdown.

3. Application.Run is called on one form only. That form is closed by the
user or your code. you do not have to call dispose on that form. A general
rule of thumb: If an object exposes Dispose you should call it (but if it
also offers Close, then that is enough).

Cheers
Daniel
 
On number 2, yes, you should use a parameterized query and
prepare it the first time you execute the command. If you have
any indexes on this SQL CE table you are inserting 5000 records into,
I'd suggest adding the index after you have completed these
inserts.

--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com
 
Back
Top