B4J Question jSQL multiple connections

miga

Member
Licensed User
Longtime User
I'm working with sqlite database with multiple connection. The work is slow down a lot when I connect to database from more then one computers. I tried to use sql.close and Cursor.close, but still it seems to be somehow connected to database. Only when I close other appliations and I'm only single user, the speed is back in normal.
How can I properly break/close connection with sqlite database?
 

keirS

Well-Known Member
Licensed User
Longtime User
SQLite is single connection only. It does not support multiple connections from different machines.
 
Upvote 0

miga

Member
Licensed User
Longtime User
SQLite is single connection only. It does not support multiple connections from different machines.

That's why I want to close connection from application if it's not necessery. And my question is how to completly close connection with database.
 
Upvote 0

keirS

Well-Known Member
Licensed User
Longtime User
Close closes the connection completely but you must ensure that all other resources (result sets) are closed before calling close.
 
Upvote 0

miga

Member
Licensed User
Longtime User
Close closes the connection completely but you must ensure that all other resources (result sets) are closed before calling close.

Sub sqlclose
If Cursor1.IsInitialized Then Cursor1.Close 'Cursor1 and Cursor2 are ResultSet
If Cursor2.IsInitialized Then Cursor2.Close
SQL1.Close
End Sub

This is what I'm doing, but it still looks like the application is somehow connected to database and doesn't allow other application (other machine) to get access. The access is allowed when I close first application.
 
Upvote 0

miga

Member
Licensed User
Longtime User
What about the DB?
I had the database on Bluearc server. Now I moved it to Win, but still the same.
I will have to rewrite the code to some kind of multi-connection database. What do you suggest? I need to store an images, strings, integers, booleans... in fact all types of data.
 
Upvote 0
Top