Search found 769 matches
- Wed Sep 03, 2025 8:40 pm
- Forum: General Discussion
- Topic: CheckDatabaseNull() Question
- Replies: 2
- Views: 400
Re: CheckDatabaseNull() Question
Procedure.i dBRecord(Map tmRec.dBValue(),tnDb.i=#dCDatabaseNo)
Define ln.i
ClearMap(tmRec())
For ln=0 To DatabaseColumns(tnDb)-1
Select DatabaseColumnType(tnDb,ln)
Case #PB_Database_String
If CheckDatabaseNull(tnDb,ln)
tmRec(DatabaseColumnName(tnDb,ln))\ValueS = ""
Else
tmRec ...
- Tue Sep 02, 2025 4:21 pm
- Forum: General Discussion
- Topic: CheckDatabaseNull() Question
- Replies: 2
- Views: 400
CheckDatabaseNull() Question
Hi
When I use the CheckDatabaseNull() function I always see the following message in the console window:
row number -1 is out of range 0..-1
I am using Postgres as the database. Is this an error message of some kind or can it be safely ignored? The function is working correctly so I am ...
When I use the CheckDatabaseNull() function I always see the following message in the console window:
row number -1 is out of range 0..-1
I am using Postgres as the database. Is this an error message of some kind or can it be safely ignored? The function is working correctly so I am ...
- Fri Aug 29, 2025 2:56 pm
- Forum: General Discussion
- Topic: Is PureBasic dead?
- Replies: 21
- Views: 2123
Re: Is PureBasic dead?
Hi
It is definitely not dead and very useful. If you want web based applications you can choose SpiderBasic or you can use PB with https://webui.me which is what I have done with some projects.
Simon
It is definitely not dead and very useful. If you want web based applications you can choose SpiderBasic or you can use PB with https://webui.me which is what I have done with some projects.
Simon
- Fri Aug 29, 2025 2:52 pm
- Forum: Coding Questions
- Topic: Serial Communication locking up.
- Replies: 11
- Views: 1165
Re: Serial Communication locking up.
I have been testing out the serial port feature in PB today, and i'm not having the greatest success.
This program: Port$ = "COM4"
If OpenSerialPort(1, Port$, 9600, #PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_RtsCtsHandshake, 128, 128)
For x=1 To 10
WriteSerialPortString(1,"IS THIS WORKING ...
- Fri Aug 15, 2025 2:59 pm
- Forum: General Discussion
- Topic: How to Check Database Connection is still valid?
- Replies: 9
- Views: 719
Re: How to Check Database Connection is still valid?
Hi
I generally check the DatabaseQuery and report any errors. So I will check my code because I may have missed a spot and that may explain why my code is not handling the disconnect properly.
Thanks JHPJHP for all your input.
Simon
I generally check the DatabaseQuery and report any errors. So I will check my code because I may have missed a spot and that may explain why my code is not handling the disconnect properly.
Thanks JHPJHP for all your input.
Simon
- Thu Aug 14, 2025 8:14 pm
- Forum: General Discussion
- Topic: How to Check Database Connection is still valid?
- Replies: 9
- Views: 719
Re: How to Check Database Connection is still valid?
Hi
I tried the code but it does not do what I need. I stepped through the code and just before executing the IF PQStatus() I restarted the Postgres server and it still reported the connection was successful.
Simon
Hi swhite,
I completely misread your first post, thanks spikey for the clarity ...
I tried the code but it does not do what I need. I stepped through the code and just before executing the IF PQStatus() I restarted the Postgres server and it still reported the connection was successful.
Simon
Hi swhite,
I completely misread your first post, thanks spikey for the clarity ...
- Thu Aug 14, 2025 2:10 pm
- Forum: General Discussion
- Topic: How to Check Database Connection is still valid?
- Replies: 9
- Views: 719
Re: How to Check Database Connection is still valid?
Hi
I will look into PQStatus as I know that anything using a select statement will fail because that is the problem I am experiencing when the server is reset.
Thanks,
Simon
I will look into PQStatus as I know that anything using a select statement will fail because that is the problem I am experiencing when the server is reset.
Thanks,
Simon
- Wed Aug 13, 2025 7:17 pm
- Forum: General Discussion
- Topic: How to Check Database Connection is still valid?
- Replies: 9
- Views: 719
How to Check Database Connection is still valid?
Hi
I had a situation where a Postgres Server was restarted and my application crashed even though I used the IsDatabase() function to check that #Database was valid. IsDatabase() continue to return a value despite the fact that the connection had been reset. Is there a way to detect when the ...
I had a situation where a Postgres Server was restarted and my application crashed even though I used the IsDatabase() function to check that #Database was valid. IsDatabase() continue to return a value despite the fact that the connection had been reset. Is there a way to detect when the ...
- Tue Aug 05, 2025 3:20 pm
- Forum: Coding Questions
- Topic: How to Receive File via REST that Requires a Header?
- Replies: 5
- Views: 394
Re: How to Receive File via REST that Requires a Header?
Hi swhite,
EDIT: Moved FreeMemory(*Buffer)
Try the following:
#AuthKey = "19044852-777D-4104-98C0-4BC48530A3F5"
URL$ = "https://beta.gvmunifi.com/api/sentinel/KARDTECHLAB1/updates/zip"
Host$ = GetURLPart(URL$, #PB_URL_Site)
NewMap Header$()
Header$("Host") = Host$
Header$("Authorization ...
- Fri Aug 01, 2025 8:33 pm
- Forum: Coding Questions
- Topic: How to Receive File via REST that Requires a Header?
- Replies: 5
- Views: 394
How to Receive File via REST that Requires a Header?
Hi
I want to access a REST API to download a file that requires a token in the "Authorization:" key. I cannot use ReceiveHTTPFile() because there is no option to include the token in the header. I tried using OpenNetworkConnection(), SendNetworkString and then ReceiveNetworkData. All I receive is ...
I want to access a REST API to download a file that requires a token in the "Authorization:" key. I cannot use ReceiveHTTPFile() because there is no option to include the token in the header. I tried using OpenNetworkConnection(), SendNetworkString and then ReceiveNetworkData. All I receive is ...
- Fri Aug 01, 2025 6:40 pm
- Forum: Feature Requests and Wishlists
- Topic: Header Support in ReceiveHTTPFile
- Replies: 1
- Views: 336
Header Support in ReceiveHTTPFile
Hi
I would like the ability to add headers to the ReceiveHTTPFile because sometimes an authorization key is needed before the file can be down loaded.
Thanks,
Simon
I would like the ability to add headers to the ReceiveHTTPFile because sometimes an authorization key is needed before the file can be down loaded.
Thanks,
Simon
- Fri Aug 01, 2025 2:57 pm
- Forum: The PureBasic Editor
- Topic: Tab Key Issue.
- Replies: 5
- Views: 506
Re: Tab Key Issue.
I use both Windows and Linux equally that's what makes it so noticeable.
- Fri Aug 01, 2025 2:55 pm
- Forum: Coding Questions
- Topic: Is this a ReplaceString Bug?
- Replies: 9
- Views: 507
Re: Is this a ReplaceString Bug?
Hi
Thanks for all the responses.
I did realize that the solution was to use "while". It is not a problem if this is the expected behavior. However, it just caught me off guard in that I expected the search to continue from the last character replaced. I also cannot use BarryG's solution because ...
Thanks for all the responses.
I did realize that the solution was to use "while". It is not a problem if this is the expected behavior. However, it just caught me off guard in that I expected the search to continue from the last character replaced. I also cannot use BarryG's solution because ...
- Thu Jul 31, 2025 9:27 pm
- Forum: The PureBasic Editor
- Topic: IDE Suggestion for Debugging
- Replies: 7
- Views: 676
IDE Suggestion for Debugging
Hi
I would like to suggest that the "Kill Program" icon be used to start the "Compile With Debugger" and then used to kill the program being debugged.
The button should be a green X which you click to "Compile With Debugger" and then once the debugger is running it turns red and clicking the red X ...
I would like to suggest that the "Kill Program" icon be used to start the "Compile With Debugger" and then used to kill the program being debugged.
The button should be a green X which you click to "Compile With Debugger" and then once the debugger is running it turns red and clicking the red X ...
- Thu Jul 31, 2025 2:39 pm
- Forum: Coding Questions
- Topic: Is this a ReplaceString Bug?
- Replies: 9
- Views: 507
Is this a ReplaceString Bug?
Hi
Is this a bug or not.
Is this a bug or not.
Code: Select all
lcTxt.s=",,,,,,,,"
lcTxt=ReplaceString(lcTxt,",,",",0,")
Debug lcTxt ; result ",0,,0,,0,,0," but expected ",0,0,0,0,0,0,0"