revOpenDatabase with remote sqlite...

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
paulsr
Posts: 222
Joined: Thu Jul 19, 2012 9:47 am
Contact:

revOpenDatabase with remote sqlite...

Post by paulsr » Mon Aug 20, 2012 8:39 am

Greetings:

Can I use revOpenDatabase to open an sqlite database on a remote server?

The documentation says "For SQLite database, the host should be the full path to the database file." In this context "the host" is the second parameter in the string.

To me, that sounds like...

revOpenDatabase(sqlite,"myserver.com/mydb.sqlite",,,,) should work.

... but I can't make it work.

Am I misunderstanding something? TIA...

--paul

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: revOpenDatabase with remote sqlite...

Post by Klaus » Mon Aug 20, 2012 11:37 am

Hi Paul,

SQLite is not meant to "serve" over the internet, it must be local!
For internet access use MySQL.


Best

Klaus

paulsr
Posts: 222
Joined: Thu Jul 19, 2012 9:47 am
Contact:

Re: revOpenDatabase with remote sqlite...

Post by paulsr » Mon Aug 20, 2012 11:50 am

Okay, thanks Klaus.

I was afraid you would say that.

I believe MySQL is not recommended on iOS, so I need a major rethink.

--paul

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: revOpenDatabase with remote sqlite...

Post by Klaus » Mon Aug 20, 2012 12:22 pm

Hi Paul,

well, MySQL is supported on iOS, but very few interet hosters do allow direct access
to MySQL databases. You may need a "muiddleware" = a CGI (PHP, Perl, LiveCode Server etc.)
that connects to the database online, fetches the records and "serves" them via HTTP.


Best

Klaus

paulsr
Posts: 222
Joined: Thu Jul 19, 2012 9:47 am
Contact:

Re: revOpenDatabase with remote sqlite...

Post by paulsr » Mon Aug 20, 2012 12:35 pm

Thanks Klaus, but I'm thinking it might be easier to make my app web-based and run it on the same server as the sqlite database.

It's a bit difficult to backtrack from where I am now.

--paul

Paul.RaulersonBUSIvAg
Posts: 21
Joined: Tue Aug 07, 2012 2:00 pm

Re: revOpenDatabase with remote sqlite...

Post by Paul.RaulersonBUSIvAg » Thu Aug 23, 2012 10:10 pm

paulsr wrote:Thanks Klaus, but I'm thinking it might be easier to make my app web-based and run it on the same server as the sqlite database.

It's a bit difficult to backtrack from where I am now.

--paul
Hi Paul -

You can run SQLite databases in a client/server configuration, there are several products out there. I do not think I can post a link for you, but simply google 'sqlite server" and I think you will find a bunch of possibilities.

Of course, you will probably need to connect to them with either custom code or with an ODBC driver. What are you really trying to accomplish? Perhaps there is an easier way.

-Paul

paulsr
Posts: 222
Joined: Thu Jul 19, 2012 9:47 am
Contact:

Re: revOpenDatabase with remote sqlite...

Post by paulsr » Fri Aug 24, 2012 4:38 am

Thanks for your thoughts Paul ... I will check into your ideas. But...

What am I trying to accomplish?... Well, I'm writing a tablet-based app that will display news articles. Actual contents doesn't matter. The app will acquire the latest articles by copying an sqlite db from a remote server.

But what I also need is a way to keep that db fed with the latest news. So, I had planed to have a Windows/Mac app that would access the remote sqlite db.

When it seemed that would not be possible, or at least not easy, I thought, well, the background app that feeds the news could be web-based and residing on the same server as sqlite db.

So, that's where I am now in my thinking, but if there are alternatives, I'm open to ideas.

I don't actually have the Livecode web module, so I'd have to give even more money to the nice people at RunRev ... which means a cheaper solution would be appreciated;-)

--paul

Post Reply