WE database newbie

Hi there!
I’ve just started using the WEB Editions and I need a bit of advice…

I’m developing a web app that collects to a couple of different databases. I’ll be making the databases at runtime. I’m quite good at this on xojo desktop.
Basically it’s a database for each customer with their details (or I’ll put them all into one great big database).

Is it just a matter of uploading the linux build onto a linux server (I might choose the xojo server if it’s harder than that)?

Can I make folders in my directory on my server with xojo WE?

How do I make and then locate my databases… Is it similar to fileItem location

What does it mean by session?

Sorry for my complete and utter ignorance.
I’m a little murky about WE as I just dived into it this week!

Hi Sean,

I hope you don’t mind if I ask a few clarifying questions. First let me ask what you’re wanting to accomplish via programmatically creating on-the-fly databases? Is there a reason you don’t want to host a simple MySQL dbase? (it’s super easy, fast, works great on Linux and with Xojo Web apps)

Hoping to help!


sure… I could make a database easy enough - I prefer to create them programmatically because then all the fields are under my control (not to mention the copy and pasting benefits)

I can nail this in Xojo desktop apps but I’m wondering about how to do it with WE.

Every customer would have a folder and a separate database in that folder that my webapp would create when I got a new customer. When they log in, they can access that database to change their info.
I could do it all in one database, but either way, I would like to know how to create a database using code in WE,

One good place to start is with the “EddiesElectronics” sample that ships with Xojo. Have you taken a look at it?

How good are you with security? How good is your hosting? Is the security really totally absolutely secure so that your data can’t be stolen and correct data can be accessed from the correct customer?

There are also 2 webinars by Xojon on REST communication: http://developer.xojo.com/webinar-web-services .


If you’re talking about SQLite databases, then sure, you easily can do exactly what you’re talking about. Postgres and/or MySQL will be a little more complicated. Just make sure that the databases themselves are not located in a directory where they can be accessed directly from the web. Otherwise anyone could potentially download anyone else’s data.

As for security, if you’ve had experience with setting up and managing servers yourself in the past, getting Xojo apps to run is not terribly hard to do. If you’re not, please consider a managed service like Xojo Cloud. Good security and regular updates are essential to keeping publicly accessible servers safe these days.

I’ll check out “Eddie’sElectronics”.
I’m pretty sure that, whatever server I end up using will be SSL for the security side.

I checked out the Web SDK manual - but it had very little to say about setting up and connection to server databases.
I’ll check out the other links :slight_smile:
I’m extremely determined … you can see my xojo app Guitar SightReader Toolbox

SSL is one thing and that will protect your app, but the server itself needs security, a firewall at the very least.

The WebSDK is not needed for database connection. If you’re using SQLite or Postgres/MySQL on the same server, you’ll just connect just like you would do in any other Xojo app. If the database(s) will be located on another server, you should consider having a middleware solution (with authentication) which you call over https to access the database. That reduces the surface area of the exposed portion of the database.