Hi all
Can someone tell me how to put an sqlite database on a network and being able to have more than one access concurrently in purebasic ?
Thanks in advance
SQLITE on a network with PB
Re: SQLITE on a network with PB
Hello Loulou.
"SQLite is not directly comparable to client/server SQL database engines such as MySQL, Oracle, PostgreSQL, or SQL"
Source : https://sqlite.org/whentouse.html
PureBasic works natively with PostgreSQL. Install PostgreSQL https://www.postgresql.org/ or https://www.postgresql.fr
"SQLite is not directly comparable to client/server SQL database engines such as MySQL, Oracle, PostgreSQL, or SQL"
Source : https://sqlite.org/whentouse.html
PureBasic works natively with PostgreSQL. Install PostgreSQL https://www.postgresql.org/ or https://www.postgresql.fr
➽ Windows 11 64-bit - PB 6.0 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti
Sorry for my bad english and the Dunning–Kruger effect.
Re: SQLITE on a network with PB
Out of this thread http://forums.purebasic.com/german/view ... 16&t=29971, mk-soft has developed a SQLite server in the German forum - http://forums.purebasic.com/german/view ... =8&t=29974
Please pardon my English, my native tongue is German.
Re: SQLITE on a network with PB
I recommend a real SQL connection with PostgreSQL
An example of a connection to a hosted database
Opens a free database (100 Mb) with this service provider.
Host postgresql-falsam.alwaysdata.net
Port 5432
User falsamdemo (Read Only :p)
Password falsamdemo
An example of a connection to a hosted database
Opens a free database (100 Mb) with this service provider.
Host postgresql-falsam.alwaysdata.net
Port 5432
User falsamdemo (Read Only :p)
Password falsamdemo
Code: Select all
Enumeration
#Database
EndEnumeration
UsePostgreSQLDatabase()
If OpenDatabase(#Database, "host=postgresql-falsam.alwaysdata.net port=5432 dbname=falsam_01", "falsamdemo", "falsamdemo", #PB_Database_PostgreSQL)
Debug "Connected to PostgreSQL"
Else
Debug "Ooops !! Not connected to PostgreSQL"
EndIf
➽ Windows 11 64-bit - PB 6.0 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti
Sorry for my bad english and the Dunning–Kruger effect.
Re: SQLITE on a network with PB
Putting the above answers together, I strongly recommend to NOT use sqlite in a network environment. It is designed as a local desktop database. If you use it through network connections and multi-client, trouble is guaranteed.
Please have a look at PostgreSQL, MariaDB, MySQL or others. This is the only correct solution for distributed clients accessing a central SQL database. Maybe, if applicable, you can also try to utilize new No-SQL databases like CouchDB or MongoDB. Some of them offer HTTP access and this can be done using PB native connectivity functions.
Please have a look at PostgreSQL, MariaDB, MySQL or others. This is the only correct solution for distributed clients accessing a central SQL database. Maybe, if applicable, you can also try to utilize new No-SQL databases like CouchDB or MongoDB. Some of them offer HTTP access and this can be done using PB native connectivity functions.
Re: SQLITE on a network with PB
Correct, unless there are reasons for this, e.g. if you need a portable ad-hoc SQL Server, which should also have custom functions, stored procedures, or filters.
I have assumed that he has a reason for it.
After all, he asked for sqlite in a network environment.
I have assumed that he has a reason for it.
After all, he asked for sqlite in a network environment.
Please pardon my English, my native tongue is German.
Re: SQLITE on a network with PB
I fully agree. Except of this, SQLite says it very clearly on their website:uweb wrote:Correct, unless there are reasons for this...
https://sqlite.org/whentouse.html:
SQLite wrote: Situations Where A Client/Server RDBMS May Work Better
Client/Server Applications
If there are many client programs sending SQL to the same database over a network, then use a client/server database engine instead of SQLite.
Re: SQLITE on a network with PB
From SQLite doc
https://sqlite.org/whentouse.html
SQLite supports an unlimited number of simultaneous readers, but it will only allow one writer at any instant in time ...