SqlExample error

enonod

Well-Known Member
Licensed User
Longtime 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
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The SQL library requires .Net CF 2.0 and a native DLL.
See the setup instructions here: www.b4x.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).
 

enonod

Well-Known Member
Licensed User
Longtime User
Thanks for your help
 

enonod

Well-Known Member
Licensed User
Longtime 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.
 

specci48

Well-Known Member
Licensed User
Longtime User
Did you copy the Dbasic.exe.config into your installation directory of basic4ppc?
 

enonod

Well-Known Member
Licensed User
Longtime 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.
 

enonod

Well-Known Member
Licensed User
Longtime User
Thank you Erel, understood.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…