Compressed libraries are not supported
Compressed libraries are not supported
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
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
Re: Compressed libraries are not supported
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
It is better to use the code of the library directly.
Link Code from ExDatabase
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Compressed libraries are not supported
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?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
Later: Failed straight away, no GlobalFree_() function.
Re: Compressed libraries are not supported
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".
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 / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Compressed libraries are not supported
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
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
Re: Compressed libraries are not supported
Should work with the demo.
Show us your test code!
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.
Show us your test code!
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 / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Compressed libraries are not supported
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 viewtopic.php?f=12&t=64410
If that doesn't cover your needs - explain why not and we might be able to advise.
You can connect to Access databases via the built in ODBC connectivity, without PBOSL or API calls. See viewtopic.php?f=12&t=64410
If that doesn't cover your needs - explain why not and we might be able to advise.
Re: Compressed libraries are not supported
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
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
Re: Compressed libraries are not supported
Some progress running the code in Spikey's link.
I got this output and error
I assume the error comes from the OpenDatabase() call.
And here is the DSN screen
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?
Code: Select all
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 assume the error comes from the OpenDatabase() call.
And here is the DSN screen
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?
Re: Compressed libraries are not supported
Yes, it does. Databases created with 32-bit applications must be opened as a 32-bit data source.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?
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! Please visit my YouTube Channel
Re: Compressed libraries are not supported
Getting there...slowly
I get this error now
I get this error now
as you said.2. The specified DSN contains an architecture mismatch between the Driver and Application.
So I guess that means I should download the 32-bit version and try with that? Which is what I'm doing now.3. Run the sample code with a 32-bit version of the PureBasic compiler.
Re: Compressed libraries are not supported
Now I get this
Re: Compressed libraries are not supported
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.GRAYnomad wrote:...I should download the 32-bit version and try with that?
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! Please visit my YouTube Channel
Re: Compressed libraries are not supported
Install the Purebasic version X86 and X64 into different folders.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Compressed libraries are not supported
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
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