Search found 20 matches

by DK5UR
Wed Sep 28, 2022 4:58 pm
Forum: Coding Questions
Topic: OpenDatabase problem with space characters in database names
Replies: 16
Views: 1663

Re: OpenDatabase problem with space characters in database names

As infratec said:

At the moment I check the packets with WireShark and always the dbname is truncated at the space character.


so, yes it is reproduceable

All attempts showed that the connection string is split or at least truncated at the blanks.
host=127.0.01
port=3306
dbname=everything_else ...
by DK5UR
Wed Sep 28, 2022 4:09 pm
Forum: Coding Questions
Topic: OpenDatabase problem with space characters in database names
Replies: 16
Views: 1663

Re: OpenDatabase problem with space characters in database names

I have tried everything ", ', `, and [ - nothing helps
by DK5UR
Wed Sep 28, 2022 4:06 pm
Forum: Coding Questions
Topic: OpenDatabase problem with space characters in database names
Replies: 16
Views: 1663

Re: OpenDatabase problem with space characters in database names

Little John wrote: Wed Sep 28, 2022 3:58 pm Maybe replace the space character with %20 (like in URLs)? Just another guess.
Doesn't helps leads to "Unknown database 'mysql%20test'".
Also any try with escape sequences ends in no result.

Problem is that the dbname is truncated at the first space character.
by DK5UR
Wed Sep 28, 2022 2:01 pm
Forum: Coding Questions
Topic: OpenDatabase problem with space characters in database names
Replies: 16
Views: 1663

Re: OpenDatabase problem with space characters in database names

infratec wrote: Wed Sep 28, 2022 1:57 pm At the moment I check the packets with WireShark and always the dbname is truncated at the space character.
That's exactly what i mentioned... So it seems to be a bug, of the OpenDatabase function, doesn't it?
by DK5UR
Wed Sep 28, 2022 1:59 pm
Forum: Coding Questions
Topic: OpenDatabase problem with space characters in database names
Replies: 16
Views: 1663

Re: OpenDatabase problem with space characters in database names

RASHAD wrote: Wed Sep 28, 2022 1:50 pm Shoot in the dark
...
Sorry RASHAD, also not the result i needed... Only the table list of the databse "mysql"
by DK5UR
Wed Sep 28, 2022 12:50 pm
Forum: Coding Questions
Topic: OpenDatabase problem with space characters in database names
Replies: 16
Views: 1663

Re: OpenDatabase problem with space characters in database names

infratec wrote: Wed Sep 28, 2022 12:45 pm Try this:

Code: Select all

host.s ="host=127.0.0.1 port=3306 dbname=`mysql test`"
Already tested... Unfortunately no success
by DK5UR
Wed Sep 28, 2022 12:07 pm
Forum: Coding Questions
Topic: OpenDatabase problem with space characters in database names
Replies: 16
Views: 1663

Re: OpenDatabase problem with space characters in database names

Nope...
Result is

Code: Select all

Unknown database '"mysql'
by DK5UR
Wed Sep 28, 2022 11:33 am
Forum: Coding Questions
Topic: OpenDatabase problem with space characters in database names
Replies: 16
Views: 1663

OpenDatabase problem with space characters in database names

I have a database on the client side named "mysql test". I know this is not a smart way to name the database, but I can't change it.
I use this code snippet to retrieve the table names from the database:

UseMySQLDatabase()
host.s = "host=127.0.0.1 port=3306 dbname=mysql test" -> results in table ...
by DK5UR
Fri Jan 22, 2016 6:03 pm
Forum: Tricks 'n' Tips
Topic: Calculation of Sunrise & Sunset time
Replies: 16
Views: 6868

Re: Calculation of Sunrise & Sunset time

Just cosmetics, 16:60 is not very common :wink:

Code: Select all

  ProcedureReturn Str(Int(sunrise)) + ":" + RSet(Str(Round(Mod(sunrise,1) * 60,#PB_Round_Down)),2,"0") + "-" + Str(Int(sunset)) + ":" + RSet(Str(Round(Mod(sunset,1) * 60,#PB_Round_Down)),2,"0")
by DK5UR
Wed Sep 30, 2015 5:31 pm
Forum: Applications - Feedback and Discussion
Topic: zBin Packer SDK - Crossplattform
Replies: 23
Views: 19711

Re: zBin Packer SDK - Crossplattform

It's an unsigned long comparing with integer probem.
NicTheQuick pointed me to this at http://www.purebasic.fr/german/viewtopic.php?p=332175#p332175 :idea: .
Just replace each
\FileInfo(Number-1)\crc
in the zBin_Unpack.pbi with
\FileInfo(Number-1)\crc & $ffffffff

This do the trick, quick and ...
by DK5UR
Fri Mar 21, 2014 8:41 pm
Forum: Coding Questions
Topic: [PB 5.22 x86] FirstDatabaseRow VFP Driver
Replies: 5
Views: 1356

Re: [PB 5.22 x86] FirstDatabaseRow VFP Driver

Ah, yes DatabaseQuery()...
I'm not at a computer, just have that problem with the flags in mind ;-)
by DK5UR
Fri Mar 21, 2014 6:53 pm
Forum: Coding Questions
Topic: [PB 5.22 x86] FirstDatabaseRow VFP Driver
Replies: 5
Views: 1356

Re: [PB 5.22 x86] FirstDatabaseRow VFP Driver

Hi Flype,
Did you check the "new" flags for OpenDatabase()?
by DK5UR
Sun Dec 08, 2013 2:43 am
Forum: Mac OSX
Topic: Opening the default browser in a URL
Replies: 3
Views: 2351

Re: Opening the default browser in a URL

You can add DK5UR or Heinz Urban, but at least it's not necessary ;-)
by DK5UR
Sat Dec 07, 2013 8:40 pm
Forum: Mac OSX
Topic: Opening the default browser in a URL
Replies: 3
Views: 2351

Re: Opening the default browser in a URL

Hi Marco,
Should be
RunProgram("open", "http://www.purebasic.com", "")

cu Heinz
by DK5UR
Tue Aug 21, 2012 2:36 pm
Forum: Mac OSX
Topic: [PB Cocoa] Cocoa companion library
Replies: 93
Views: 43554

Re: [PB Cocoa] Cocoa companion library

wilbert wrote:PureBasic however doesn't support user customization.
It does
Image

Thanks for the hints. Next is to attach a menu to a tbButton :)