SqlExample error

Discussion in 'Questions (Windows Mobile)' started by enonod, Oct 12, 2007.

  1. enonod

    enonod Well-Known Member Licensed User

    I am trying the SQLExample and receive the error 'The format of the file SQLDesktop.dll is invalid'.
    I do not know whether running the program uses the dll in the library folder or the one included in the example, nor how to temporarily change it if it is the wrong one.

    Am I correct in assuming that the one included is to overcome a change in the dll between the program being written and the latest issue of the dll?

    Some guidance would be appreciated
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    The SQL library requires .Net CF 2.0 and a native DLL.
    See the setup instructions here: www.basic4ppc.com/Downloads.html (under the SQL download).

    Basic4ppc uses the dll files that are under the same folder of the source code / compiled file.
    When you add a library, it will copy this library to the source code folder.
    The SQL library is a special one and it requires an additional dll file. This file should be under the same folder of Basic4ppc (or the compiled file).
     
  3. enonod

    enonod Well-Known Member Licensed User

    Thanks for your help
     
  4. enonod

    enonod Well-Known Member Licensed User

    I did have net CF2.
    The source folder for your SQLExample did contain the SQL dll for device and desktop.
    The source folder did not have SQLite dll so I copied it there.
    The library and desktop folders of the installation all have the correct dll files in the correct place.
    Opening SQLExample from the desktop IDE creates the original error.

    Any further help please.
     
  5. specci48

    specci48 Well-Known Member Licensed User

    Did you copy the Dbasic.exe.config into your installation directory of basic4ppc?
     
  6. Erel

    Erel Administrator Staff Member Licensed User

  7. enonod

    enonod Well-Known Member Licensed User

    Thank you both very much.
    I already had net CF2 on both device and desktop and did not then realise I needed something specific to B4PPC. I have now found the config files.
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    Basic4ppc uses .Net 1.0 by default.
    The reason is that most devices are installed with .Net CF 1.0 (all devices except of WM6.0 devices).
    The config file sets Basic4ppc to use .Net CF 2.0.
     
  9. enonod

    enonod Well-Known Member Licensed User

    Thank you Erel, understood.
     
Loading...