AddObject error

BPak

Active Member
Licensed User
Longtime User
I have a main Module and another module I named DM.

In the DM I want to addObject.

However, when I call the Public Sub OpenDBaseCon

I get an error displayed that the SQLiteDLL is not available. Though I did add it to the components in the DM Module.

B4X:
Sub Globals
   'Declare the global variables here.
   Public DBase
End Sub

Public Sub OpenDBaseCon
   AddObject ("DBase", "Connection")
   DBase.New1
   DBase.Open("Data Source = " & AppPath & "\TSCR.sl3")
End Sub
 

Attachments

  • err.PNG
    err.PNG
    15.6 KB · Views: 239

mjcoon

Well-Known Member
Licensed User
I get an error displayed that the SQLiteDLL is not available. Though I did add it to the components in the DM Module.

You have to be precise about the names of these DLLs. The one listed in the components will be either SQLDevice.dll or SQLDesktop.dll. This in turn will have a dependency upon lower DLLs, and your error message refers quite specifically to one of those, which you must make available in the home folder. Read the guidance for SQLite if necessary.

Basic4PPC will check that the libraries that are listed in Components are present when you run the IDE but cannot check lower-down dependencies.

Mike.
 

BPak

Active Member
Licensed User
Longtime User
I am using the 6.9 (latest version) purchased 28/09/2010.

shots of the components and the app folder below.

My mistake - I thought 'System.Data.SQLite.dll ' was only needed with completed app installed.

I think I might have had a 'senior moment' last week as I was looking through the Library upgrades on the Forum and noticed the SQL was updated on the 11th month of 2010, so took it down and installed it as instructed.

Looking back yesterday night I noticed it is now 11th month of 2009.

Maybe that SQL update is not the one for ver. 6.9?

So I found a 6.9 app that works with sqlite and copied the 'SQLDesktop.dll' from it into my app folder.

Yes it then works. Must be a corruption somewhere??

Guess I just need to reinstall the 6.9 version to get back to start point.
 

Attachments

  • comp.PNG
    comp.PNG
    2.9 KB · Views: 218
  • appfld.PNG
    appfld.PNG
    10 KB · Views: 256

BPak

Active Member
Licensed User
Longtime User
As a point of interest the 'SQLDesktop.dll' that I removed from my app folder was 20kb in size.

The 'SQLDesktop.dll' that I copied into my app folder was only 10 kb in size.

?
 
Top