I need to detect MS Access database or SQL Server Compact Edition (MSSQL CE) by a query.
I have to be able to know by a query result if I am querying Access or Compact Edition. The application sometimes runs from Windows Mobile and utilizes SQL Server Compact Edition, and other times runs in a desktop utilizing MS Access.
I already know that I can detect the SQL Server Compact Edition version by reading the first bytes of the database file, like stated here and here too
I also know that I can detect the Sever Version of SQL 2005 or 2008 like explained also here
I know too that I can check the Windows registry and look for an specific key.
None of these options works for me since I am executing the query from an application running in Windows Mobile.
Note: Unfortunately, I cannot execute shell commands or call an external application from the App.
Any suggestion is very welcome.
Try calling
SQL server will return a value.
Access will return an error