It is currently Fri Feb 26, 2021 7:20 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Compressed libraries are not supported
PostPosted: Sun Feb 21, 2021 5:23 am 
Offline
User
User

Joined: Sun Feb 21, 2021 5:02 am
Posts: 10
Hi guys,

It's been a long search for a VB6 replacement I think I've found it in PureBasic, so to that effect I'm trying to see if I can do a few things that I am used to doing by playing with the free version.

After much ado I finally figured out how to load user libraries, specifically PBOSL_ExDatabase as I want to connect to an Access DB, but now I get

"compressed libraries are not supported (PBOSL_ExDatabase)"

And the compiler doesn't load.

Is this a limitation of the free version?

If Purebasic can do what I need I'm happy to buy it, but I need to be sure first with some more testing and this seems to be a brick wall.

Rob


Top
 Profile  
Reply with quote  
 Post subject: Re: Compressed libraries are not supported
PostPosted: Sun Feb 21, 2021 11:59 am 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2876
Location: Germany
User libraries created with Talbite must be partially recompiled with a new version of Purebasic.
It is better to use the code of the library directly.

Link Code from ExDatabase

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Compressed libraries are not supported
PostPosted: Mon Feb 22, 2021 4:19 am 
Offline
User
User

Joined: Sun Feb 21, 2021 5:02 am
Posts: 10
mk-soft wrote:
User libraries created with Talbite must be partially recompiled with a new version of Purebasic.
It is better to use the code of the library directly.

Link Code from ExDatabase


Thanks, I've give that a go. Mind you I'm well out of my depth with this, I was quite used to working with MDB files from VB but none of the functions are the same here. Does the DBview library (or another wrapper) help in that regard?

Later: Failed straight away, no GlobalFree_() function.


Top
 Profile  
Reply with quote  
 Post subject: Re: Compressed libraries are not supported
PostPosted: Mon Feb 22, 2021 12:07 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2876
Location: Germany
Is it Window? Do you have the demo or full version of Purebasic?

Only with the full version are (almost) all Window API defined and therefore the direct access to the API (functions with "_").

Purebasic supports ODBC directly (not ADODB directly).

Window provides the database drivers (MDB, Excel, etc) for the 32bit application. For 64 bit applications you have to download and install the Access Database Engine from Microsoft.

For testing you can create a DSN yourself with the ODBCAD32.exe.
Path 32bit "C:\Window\SysWOW64\odbcad32.exe", 64bit "C:\Windows\System32\odbcad32.exe".

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Compressed libraries are not supported
PostPosted: Mon Feb 22, 2021 2:17 pm 
Offline
User
User

Joined: Sun Feb 21, 2021 5:02 am
Posts: 10
Windows 8 64bit, demo version.

I don't want to spend 79 euros before I'm happy that I can get a few things to work.

I've installed the Access drivers and created a DSN that points to my MDB file.

Hopefully that will allow the DB stuff to work, but I still the same compiler error about the API call.

So you are saying that I cannot test this without buying the product? That's a bummer and probably a deal breaker I'm afraid.

Rob


Top
 Profile  
Reply with quote  
 Post subject: Re: Compressed libraries are not supported
PostPosted: Mon Feb 22, 2021 2:58 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2876
Location: Germany
Should work with the demo.

Show us your test code! :wink:
P.S. You must remove the PBOSL User Libray again ...

P.P.S
But you can't test the code examples that use the API with the demo version. You would have to import and adapt all API calls yourself. This is a limitation of the demo version of Purebasic.
A database query with the standard commands (ODBC) on a DSN should work with the demo.

But the ExDatabase.pbi uses API calls and is therefore not executable with the demo version.

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Compressed libraries are not supported
PostPosted: Mon Feb 22, 2021 4:38 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 22, 2010 1:17 pm
Posts: 380
Location: United Kingdom
Why don't you tell us what you want to do? And what made you think you were going to need the PBOSL library in the first place. That way we can give specific advice.

You can connect to Access databases via the built in ODBC connectivity, without PBOSL or API calls. See https://www.purebasic.fr/english/viewtopic.php?f=12&t=64410

If that doesn't cover your needs - explain why not and we might be able to advise.


Top
 Profile  
Reply with quote  
 Post subject: Re: Compressed libraries are not supported
PostPosted: Mon Feb 22, 2021 10:06 pm 
Offline
User
User

Joined: Sun Feb 21, 2021 5:02 am
Posts: 10
I've removed the PBOSL code, as a newbie to this language I somehow got the idea I needed a lib to access Access :)

At this point I'd be happy to just read some records from any table, just to prove to myself that I can in fact work with my legacy DB.

There's an example on that link Spikey, I'll modify it and see if that works.

Rob


Top
 Profile  
Reply with quote  
 Post subject: Re: Compressed libraries are not supported
PostPosted: Tue Feb 23, 2021 1:36 am 
Offline
User
User

Joined: Sun Feb 21, 2021 5:02 am
Posts: 10
Some progress running the code in Spikey's link.

Code:
UseODBCDatabase()

If ExamineDatabaseDrivers()
  ;this should display the datasource that was just created
  While NextDatabaseDriver()
    Debug  DatabaseDriverName()
  Wend
 
  ;use the Data Source Name provided in the ODBC setup
  If OpenDatabase(0, "Access MDB", "", "", #PB_Database_ODBC)
    ;reading from the [tblEmployess] table
    If DatabaseQuery(0, "Select * From keywords")
      While NextDatabaseRow(0)
        ;displays all the first and last names
        Debug GetDatabaseString(0, 2) + " " + GetDatabaseString(0, 1)
      Wend
    Else
      MessageRequester("ODBC", DatabaseError())
    EndIf
    CloseDatabase(0)
  Else
    MessageRequester("ODBC", DatabaseError())
  EndIf
Else
  MessageRequester("ODBC", "No ODBC data sources found!")
EndIf


I got this output and error

Image

I assume the error comes from the OpenDatabase() call.

And here is the DSN screen

Image

I ran the 64-bit DSN version because I have a 64-bit machine, but the DB was created years ago on a 32-bit machine, Does that matter?


Top
 Profile  
Reply with quote  
 Post subject: Re: Compressed libraries are not supported
PostPosted: Tue Feb 23, 2021 3:53 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2011 3:47 am
Posts: 2432
Location: Singapore
GRAYnomad wrote:
...I ran the 64-bit DSN version because I have a 64-bit machine, but the DB was created years ago on a 32-bit machine, Does that matter?

Yes, it does. Databases created with 32-bit applications must be opened as a 32-bit data source.

1. Run the 32-bit version of the ODBC Data Source Administrator.
2. Add the sample AgeRange.mdb database again (with a different name).
3. Run the sample code with a 32-bit version of the PureBasic compiler.


These are the two most common errors with ODBC:
1. Cannot open a database created with a previous version of your application.
This occurs when a data source is mounted with the wrong bit size.

2. The specified DSN contains an architecture mismatch between the Driver and Application.
This occurs when attempting to open a data source with an application of a different bit size.

_________________
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!


Top
 Profile  
Reply with quote  
 Post subject: Re: Compressed libraries are not supported
PostPosted: Tue Feb 23, 2021 5:09 am 
Offline
User
User

Joined: Sun Feb 21, 2021 5:02 am
Posts: 10
Getting there...slowly

I get this error now
Quote:
2. The specified DSN contains an architecture mismatch between the Driver and Application.

as you said.

Quote:
3. Run the sample code with a 32-bit version of the PureBasic compiler.

So I guess that means I should download the 32-bit version and try with that? Which is what I'm doing now.


Top
 Profile  
Reply with quote  
 Post subject: Re: Compressed libraries are not supported
PostPosted: Tue Feb 23, 2021 5:16 am 
Offline
User
User

Joined: Sun Feb 21, 2021 5:02 am
Posts: 10
Now I get this

Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Compressed libraries are not supported
PostPosted: Tue Feb 23, 2021 5:34 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2011 3:47 am
Posts: 2432
Location: Singapore
GRAYnomad wrote:
...I should download the 32-bit version and try with that?

Yes. Once downloaded and installed, you could run both 32-bit and 64-bit compilers within a single IDE. From the Compiler > Compiler Options menu, simply switch between preferred compilers in the Use Compiler field.

In regard to the missing library error, since PureBasic x86 was just installed, try a reboot, perhaps.

_________________
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!


Top
 Profile  
Reply with quote  
 Post subject: Re: Compressed libraries are not supported
PostPosted: Tue Feb 23, 2021 8:37 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2876
Location: Germany
Install the Purebasic version X86 and X64 into different folders.

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Compressed libraries are not supported
PostPosted: Tue Feb 23, 2021 10:36 pm 
Offline
User
User

Joined: Sun Feb 21, 2021 5:02 am
Posts: 10
I have both installed now, yes different folders and rebooted.

I can run both, but cannot swap compilers from within either one. The only option given is the "native" compiler to the version I'm running. Not that it really matters, I can just use one IDE or the other I guess.

As for the test program.

32-bit compiler: Same "missing OBJECT" error as before with 64-bit.
64-bit compiler: Same errors as before (architecture mismatch etc) but also "The required compiler cannot be found" when I load the "Compiler options" dialog and also when first tried a compile. Not seen in subsequent tries though, only the first time the IDE was loaded I think. Now that I've closed and opened a few time I don't get the compiler not found errors any more, but still have the original architecture mismatch problem.

Rob


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye