New to Xojo, and DB server question.

Hi Folks.

I’m just now getting around to downloading Windows XOJO. I have an app I want to sell maybe, and this app needs access to a DB. The app will never have more than say 5 people at the upmost using it at the same time, and probably will be between 2 and 3 at a time, but I have to be sure it’s reliable and works no matter. I used to work with VB and SQL server back in the 90’s as well as classic ASP, etc, and I had used Access and had terrible problems with just a few users on a file server, etc, and so I’m really careful now and since I’m selling I want to impress and continue to insure my app works great and I continue to impress my clients or potential clients.

I’m wondering if using SQL lite supports say up to 5 or 10 people if they are just reading data and not doing updates at the same time, or if there is a way to lock the DB so only one person at a time can update it and make sure it’s not corrupted, etc,. I thought I read somewhere that it (SQLlite) is really robust compared to other file based DB’s such as Access, etc,. Is this too dangerous? If so, I can of course use the pro version and some DB such as SQL server, but the client I’m considering this work for doesn’t really want the overhead of a big enterprise database and then having to get another computer / server for an enterprise DB, etc?

I also have a couple potential clients that want to do such type work and don’t have enterprise DB’s and no tech support, etc, as they are really small business’ and need something that just works with a desktop app on their Windows machine, etc,. They do however have a file server, and would like to store the app on this and then just allow it’s use between the small amount of employee’s they have. What to do?

Thanks so much in advance.
Tim

[quote=187621:@Tim Smallwood]Hi Folks.

I’m just now getting around to downloading Windows XOJO. I have an app I want to sell maybe, and this app needs access to a DB. The app will never have more than say 5 people at the upmost using it at the same time, and probably will be between 2 and 3 at a time, but I have to be sure it’s reliable and works no matter. I used to work with VB and SQL server back in the 90’s as well as classic ASP, etc, and I had used Access and had terrible problems with just a few users on a file server, etc, and so I’m really careful now and since I’m selling I want to impress and continue to insure my app works great and I continue to impress my clients or potential clients.

I’m wondering if using SQL lite supports say up to 5 or 10 people if they are just reading data and not doing updates at the same time, or if there is a way to lock the DB so only one person at a time can update it and make sure it’s not corrupted, etc,. I thought I read somewhere that it (SQLlite) is really robust compared to other file based DB’s such as Access, etc,. Is this too dangerous? If so, I can of course use the pro version and some DB such as SQL server, but the client I’m considering this work for doesn’t really want the overhead of a big enterprise database and then having to get another computer / server for an enterprise DB, etc?

I also have a couple potential clients that want to do such type work and don’t have enterprise DB’s and no tech support, etc, as they are really small business’ and need something that just works with a desktop app on their Windows machine, etc,. They do however have a file server, and would like to store the app on this and then just allow it’s use between the small amount of employee’s they have. What to do?

Thanks so much in advance.
Tim[/quote]

Hi Tim. SQLite works in serilized mode by default (SQLite can be safely used by multiple threads with no restriction.).

Along with this SQlite supports multiple users which you have to set true using SQLiteDatabase.multiuser within Xojo.

HTH,
Mike

  • The processes using the database must be on the same host computer
  • WAL does not work over a network filesystem

[quote=187636:@Markus Winter]- The processes using the database must be on the same host computer

  • WAL does not work over a network filesystem[/quote]

does it mean that the data file and the program have to be on the same machine under different users folder… and other users from different machine connect to the machine on the different user folder and run the application.

The application and SQLite file must be on the same computer.

Tim, another solution you may want to look into is Microsoft’s SQL Server Express. It’s certainly capable of handling five users and the nice part is that upgrading to a full version is really easy (assuming you’re familiar with SQL Server).

Thank you folks so much for the answers.

Greg, don’t you have to have the Pro version of xojo to use SQL server? Or, can I connect using desktop or ? Just wondering which version I need to get. I’m very, very familiar with SQL server as I used it loads with classic ASP and VB back in the day… (late 90’s).
Thanks again to everyone for the answers. I really appreciate it.
Playing with xojo now and love it.

I’m a little confused I guess. So, can I use the desktop version of Xojo to access a SQL server express db on a file server? Is this against the licensing or is this even possible with the desktop version?

Per the grid here: https://xojo.com/store/index.php

If you have a Desktop license (not to be confused with the Single Desktop) then you should be licensed to access database servers. This assumes you purchased your license since the last license change end of 2014.

Good day,

I am running a small business on cubeSQL for now a bit more than 4 (or is it already 5?) years - using a XOJO application on Macs & PCs alike. We’re 14 people in 2 offices and I never ever ran into trouble with cubeSQL once. cubeSQL uses SQLite “underneath” - extremely easy to configure & maintain - and there’s a free version for up to 3 users. Have a look at it @ www.sqlabs.com

Good luck,

Jan :slight_smile:

I have to echo Jan’s remarks. We have been using CubeSQL for 4 or 5 years and have had zero problems. Mac and Windows sharing the same data.

On the other hand, we have an application that uses SQLITE and while we don’t recommend multiple users, we know that there are multiple users accessing our data files, and thus far, no problems. It’s hard to quantify this, but generally it is a shared file on a network. Exactly how many users are accessing is hard to tell because this is a COTS (commercial off the shelf) application and the only way we hear about this is if they call for support.

There is nothing in the software that prevents multiple users from accessing the data.

I was a big user of SQL Server starting with 4.2 and going right up to SQL Server 2012. However for the last while I have been working with PostgreSQL and can not recommend it too highly - really is fantastic, all the power of SQL Server or Oracle and it does not cost a dime! It is very easy to install and you can script the installation of your database + seed data and so on.

I’ve only used XOJO to write tools for working with PostgreSQL, but it seems to work very well. Also I like PostgreSQL’s event channels and the fact that XOJO apps can hook in and listen for database events.

[quote=188082:@James Dooley]I was a big user of SQL Server starting with 4.2 and going right up to SQL Server 2012. However for the last while I have been working with PostgreSQL and can not recommend it too highly - really is fantastic, all the power of SQL Server or Oracle and it does not cost a dime! It is very easy to install and you can script the installation of your database + seed data and so on.

I’ve only used XOJO to write tools for working with PostgreSQL, but it seems to work very well. Also I like PostgreSQL’s event channels and the fact that XOJO apps can hook in and listen for database events.[/quote]

James, I’d be interested in finding out a little more about how well the event listening has worked overall. I asked a similar question about this some time ago; it is something I know I will have to revisit at some point in the future but not right now. PostgreSQL was recommended as well as possibly doing it in Xojo using the communication options, which looked quite impressive when I looked into them further. I can visualise how to implement it in Xojo, which would leave me more freedom on the choice of database, but potentially introduced a single point of failure.

Hi Stephen,

As I already mentioned I’ve only used XOJO with PostgreSQL to write a few tools and a couple of examples with even handlers and it seems to work just fine.

In the day job, I have just started testing a large scale (on average 2,000 concurrent users) .Net application that makes use of the feature for expiring cached objects. It’s a banking application and so some things like customers, portfolios, rights etc… change slowly over time, where as others like exchange rates, prices etc… change very quickly. The slowly changing items are cached in memory and there is a callback function that checks the PostgreSQL channel to find out if a change has occurred and if so it expires the item so that it gets reloaded the next time it is requested. On the database side there are CRUD triggers that fire a message at the channel indicating the id of the record that changed and the type of operation. It is all very light weight and so far looks very promising, but it is early days. There is a separate channel for each type of entity and the messages are very small, so an update to a customer record would look something like this: “CUST U 123456-9” and so on.

I’m not a XOJO expert by any means, but I don’t see why something like this could not be realised with it.