Page 13 of 17

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Thu Sep 27, 2018 12:50 pm
by Bisonte
KJ67 wrote:
the.weavster wrote:
the.weavster wrote:If I Compile/Run a program then click the title bar of that program's main window and while keeping my mouse button down wiggle it from side to side the IDE crashes.
I was wrong, it's not crashing it's just minimizing, I can alt-tab back to it.
Sounds like built-in Win10 with mouse gestures maybe?
Since Windows 7 we can do such things ;)

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Thu Sep 27, 2018 1:59 pm
by Paul
the.weavster wrote:
Fred wrote:For UseMySQLDatabase(), the OpenDatabase() command must be used like that:

Code: Select all

db = OpenDatabase(#PB_Any, "host=localhost port=3306 dbname=yourdb", User$, Pass$)
Could this be made to work on Linux by having libmariadb.so in the same folder as the executable? I'm thinking of a CGI on a Linux server where you don't have control over what the web host has installed, you can be pretty sure MySQL will be there but not libmariadb.so.
UseMySQLDatabase( [LibraryName$] ) ;<--- optional path to libmariadb library

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Thu Sep 27, 2018 2:54 pm
by captain_skank
FRED : UseMySQLDatabase() is the single best thing since sliced bread :)

I noticed in the comments that this was sponsered by Paul, how much sponsership would it take for secure MySql interaction ??

cheers

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Thu Sep 27, 2018 3:38 pm
by MrMat
DontTalkToMe wrote:
MrMat wrote: but there are still a lot of scaling issues. For instance, the toolbar icons are too small
Indeed but you and everyone else should post all this in the bug forum, here this can be rightfully ignored or innocently missed.
I agree mate but it's already in the bug forum and this was a reply to Fred asking about the DPI issues a few posts above in this thread. So all bases are covered :-)

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Thu Sep 27, 2018 3:43 pm
by Fred
Paul wrote:
the.weavster wrote:
Fred wrote:For UseMySQLDatabase(), the OpenDatabase() command must be used like that:

Code: Select all

db = OpenDatabase(#PB_Any, "host=localhost port=3306 dbname=yourdb", User$, Pass$)
Could this be made to work on Linux by having libmariadb.so in the same folder as the executable? I'm thinking of a CGI on a Linux server where you don't have control over what the web host has installed, you can be pretty sure MySQL will be there but not libmariadb.so.
UseMySQLDatabase( [LibraryName$] ) ;<--- optional path to libmariadb library
If your linux comes with libmysql.so, you can use it, or you can ship the libmariadb.so with your exe.

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Thu Sep 27, 2018 4:07 pm
by the.weavster
Fred wrote:
Paul wrote:UseMySQLDatabase( [LibraryName$] ) ;<--- optional path to libmariadb library
If your linux comes with libmysql.so, you can use it, or you can ship the libmariadb.so with your exe.
Very cool :D

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Thu Sep 27, 2018 11:18 pm
by Andre
I haven't used any of the new and very impressive functions of the PB5.70 version... but I can confirm, that with Beta2 the Autocomplete popup problem is solved and my big project still runs fine. So thank you :D

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Fri Sep 28, 2018 11:38 am
by mk-soft
Missing Contant #PB_Database_MySQL for OpenDatabase()

I found libmariadb.dylib for MacOS and copie this file into my program folder.
But UseMySQLDatabase failt...

How to do on MacOS?

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Mon Oct 01, 2018 10:38 am
by User_Russian
Fred wrote:
User_Russian wrote:All parameters are string. How to transfer a binary file using POST request?
You need to use HTTPRequestMemory().
If it is necessary to transfer a large file (many gigabytes) to the server (POST request), this function will not work for this because won’t load so much memory?
Need a method to send the data separated into several parts.
This is true for the ReceiveHTTPMemory function.

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Tue Oct 02, 2018 3:21 pm
by Marc56us
About HTTPRequest() and HTTPRequestMemory()

:idea: Wouldn't it be better to name constant #PB_HTTP_StatusCode instead of #PB_HTTP_ErrorCode?
:arrow: The reason: there is always a return message in HTTP dialog, but this message is not necessarily an error message 8)

cf: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

All HTTP response status codes are separated into five classes (or categories). The first digit of the status code defines the class of response. The last two digits do not have any class or categorization role. There are five values for the first digit:

1xx (Informational): The request was received, continuing process
2xx (Successful): The request was successfully received, understood, and accepted
3xx (Redirection): Further action needs to be taken in order to complete the request
4xx (Client Error): The request contains bad syntax or cannot be fulfilled
5xx (Server Error): The server failed to fulfill an apparently valid request


This makes more sense (IMHO) to name it #PB_HTTP_StatusCode and since the function is not yet documented, it should be possible ?

:?: :wink:

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Wed Oct 03, 2018 2:32 pm
by Psychophanta
Thanks.

:)

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Sun Oct 07, 2018 10:25 am
by SparrowhawkMMU
Marc56us wrote:About HTTPRequest() and HTTPRequestMemory()

:idea: Wouldn't it be better to name constant #PB_HTTP_StatusCode instead of #PB_HTTP_ErrorCode?
+1 It's a status code, not necessarily an error code. It would be odd to check for Error Code = 200 OK!

I have not had a chance to test this latest release yet, not will I for a few days at least, but I must say the addition of easy REST and (finally, yay!) MySQL integration are great additions.

My one issue is that macOS does not appear to be supported with regards the mariadb lib - is this the case or is there a version for Mac available? (basing this on comments above)

Anyway, as ever, thanks to the PB team and also to the sponsors for getting these feature included. :)

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Sun Oct 07, 2018 1:52 pm
by Dude
Andre wrote:I haven't used any of the new and very impressive functions of the PB5.70 version... but I can confirm, that with Beta2 the Autocomplete popup problem is solved and my big project still runs fine. So thank you :D
Just wanted to say: my situation is now exactly the same as Andre's. Downloaded 5.70 and it's all working great. :)

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Sun Oct 21, 2018 1:31 pm
by useful
In 2018, the news will be?
If not, we can wait.
But I really want certainty.

Re: PureBasic 5.70 LTS beta 2 is out !

Posted: Mon Oct 22, 2018 10:01 am
by Fred
SparrowhawkMMU wrote:
Marc56us wrote:About HTTPRequest() and HTTPRequestMemory()

:idea: Wouldn't it be better to name constant #PB_HTTP_StatusCode instead of #PB_HTTP_ErrorCode?
+1 It's a status code, not necessarily an error code. It would be odd to check for Error Code = 200 OK!

I have not had a chance to test this latest release yet, not will I for a few days at least, but I must say the addition of easy REST and (finally, yay!) MySQL integration are great additions.

My one issue is that macOS does not appear to be supported with regards the mariadb lib - is this the case or is there a version for Mac available? (basing this on comments above)

Anyway, as ever, thanks to the PB team and also to the sponsors for getting these feature included. :)
I will change the constant from Error to Status. What do you mean by not supported on OS X ? I tried it here and it worked, could you tell me how you tested it ?