Grimpi IT Blog

noviembre 3, 2008

Detectar la versión de una base SQL Server Compact Edition

Filed under: SQL Server CE — Etiquetas: , — grimpi @ 1:16 am

Ayer descubrí un link muy interesante de como detectar la versión de un archivo SDF sin necesidad de abrir una conexión a la base.

http://nativemobile.blogspot.com/2007/12/detecting-sdf-file-version.html

La técnica consiste en abrir el archivo como si fuera un binario común y leer una serie de caracteres del archivo en una posición determinada. Dependiendo de la marca que se encuentra en el archivo, es una versión diferente.
Porque complicarse la vida haciendo esto cuando podemos abrir la conexión, llamar a la propiedad ServerVersion del objeto SqlCeConnection?
Respuesta simple: No se puede abrir una base de SQL Server CE 3.1 usando las librerías de 3.5. Por lo tanto, si necesitamos hacer una aplicación que sepa trabajar con ambas versiones simultáneamente, antes de abrir la conexión, debemos averiguar la versión de la base para saber a qué versión de la librería de conexión a la base debemos instanciar.

5 comentarios »

  1. If some one desires to be updated with most up-to-date technologies afterward he
    must be pay a visit this website and be up to date
    daily.

    Comentarios por rum and powerade — May 5, 2013 @ 3:33 am

  2. Buying a used car can be tricky, no matter how much
    you already know about cars. There are lots of different things
    to consider so that you don’t end up buying a piece of junk that breaks down right away. Use some great tips of the trade in the following article to help you make your next car choice.

    Comentarios por cars — May 25, 2013 @ 10:06 pm

  3. Aw, this was an incredibly nice post. Spending some time and actual effort to generate a great article… but what can I say… I put things off a lot
    and don’t seem to get nearly anything done.

    Comentarios por htc inspire 4g unlock — May 29, 2013 @ 12:05 pm

  4. Hello! This is my 1st comment here so I just wanted to
    give a quick shout out and tell you I really enjoy reading
    your posts. Can you suggest any other blogs/websites/forums that deal with the same topics?
    Thank you!

    Comentarios por unlocking blackberry z10 — May 29, 2013 @ 7:29 pm

  5. Hi! Someone in my Myspace group shared this site with us
    so I came to look it over. I’m definitely enjoying the information. I’m bookmarking
    and will be tweeting this to my followers! Great blog and terrific style and design.

    Comentarios por arm and hammer coupons — junio 2, 2013 @ 9:42 am


RSS feed for comments on this post. TrackBack URI

Replica a htc inspire 4g unlock Cancelar la respuesta

Crea un blog o un sitio web gratuitos con WordPress.com.