Complex situation and DB

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Complex situation and DB

Post by MaxV » Tue Apr 03, 2018 9:02 am

Hi,
I post here because is not really DB related.
Question n.1
I have an app that connect to an SQLITE DB.
If the EXE is on a shared folder the DB in the same folder (so I use relative path), can the remote user launch the EXE and using it or the path is messed?

Question n.2
I have an app that connect to an MySQL DB (MariaDB).
If the EXE is on a shared folder and the DB in the localhost, can the remote user on another PC launch the EXE and using it or the server path is messed?
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

AxWald
Posts: 578
Joined: Thu Mar 06, 2014 2:57 pm

Re: Complex situation and DB

Post by AxWald » Thu Apr 05, 2018 2:45 pm

Hi,
MaxV wrote:
Tue Apr 03, 2018 9:02 am
Question n.1
I have an app that connect to an SQLITE DB.
If the EXE is on a shared folder the DB in the same folder (so I use relative path), can the remote user launch the EXE and using it or the path is messed?
I've found out that using relative paths with databases is calling for problems. So I'd strongly suggest the use of absolute paths - they are easy enough to construct.

In your case this may work - the target db should be the same, no matter from where the .exe is called. Assuming Win as OS (".exe") and a fixed LC version (because you'll find differences in working/ not working of relative paths in different OS and LC versions).
MaxV wrote:
Tue Apr 03, 2018 9:02 am
Question n.2
I have an app that connect to an MySQL DB (MariaDB).
If the EXE is on a shared folder and the DB in the localhost, can the remote user on another PC launch the EXE and using it or the server path is messed?
I'd assume the db is searched on the machine from where the .exe is called.

Have fun!
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Complex situation and DB

Post by MaxV » Tue Apr 10, 2018 10:52 am

I have done some tests for the sqlite DB.
Using local path and same folder of exe and sqlite file is the best option.
This way many users on different PCs can use the same EXE and the same DB those are on a shared folder.

I'll investigate on the MySQL case.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”