Checking whether SQL Server CE is installed

  • Thread starter Thread starter Shannon Lloyd
  • Start date Start date
S

Shannon Lloyd

Hi,
I vaguely remember having a solution to this quite a while ago, but have
been away from PPC development for a while and now am again confronted
with this issue. Our users need to have this installed to use our app,
and I need to check to see if it is installed (and if not, install it
automatically). Am I right in thinking that the easiest/best way to
check this is simply to write a small app for the device which will
attempt to connect to the server, and if I get an exception (assuming my
connection string is ok), then it isn't installed? Is there a better
way? Is there perhaps a file that I can check for on the device which
will tell me if the server is installed (eg "\Windows\SQLCE *\")?
Thanks,
Shannon
 
Please post your SQL CE/SQL Mobile questions at
microsoft.public.sqlserver.ce

yes, you can try to create a new SqlCeConnection and
catch the exception or you can check for the presence of
one of more of the SQL CE DLLs in the Windows directory
on device (File.Exists() )

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