Anyone have any experience with the above? Up to now, I've been using a db on my local Mac but now I want to access one on another Mac in my network.
I've set up a shared folder on the remote Mac and allowed read and write access to the login I use on that Mac. Then I connect to the remote Mac from my Mac using the logon I"ve set up. I know that's OK because I can happily copy files to and from my Mac to the shared folder on the remote Mac.
In my code, I prompt the user for the db to be opened, check if that file exists ( that check works OK), then call revOpenDatabase to open it. All I get is a useless error message "Unable to open database".
The logic is the same no matter whether the db is on my local Mac or the remote one and it works fine for dbs on my local Mac. The call to revOpenDatabase looks like this:
get revOpenDatabase(pdbType, tSQLiteDatabaseFile,,,,)
pdbtype is "sqlite"
tSQLiteDatabaseFile is "/Volumes/BandTrak/BandTrak.s3db" which is exactly what is returned from the answer file command
Got a feeling that I need to do something different to open a database on a remote computer but not sure what it is.
Thanks,
Pete
Connecting to a remote sqlite database
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Connecting to a remote sqlite database
Hi Pete,
You can use the command line version of sqlite3 over ssh or use cgi or php.
This puzzles me: "/Volumes/BandTrak/BandTrak.s3db". Probably, you have no permissions to write there. Shouldn't this be something like "/Volumes/Pete/Some Folder/BandTrak.s3db"?
Best,
Mark
You can use the command line version of sqlite3 over ssh or use cgi or php.
This puzzles me: "/Volumes/BandTrak/BandTrak.s3db". Probably, you have no permissions to write there. Shouldn't this be something like "/Volumes/Pete/Some Folder/BandTrak.s3db"?
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Connecting to a remote sqlite database
Thanks Mark. You'e right, the filepath does look a little odd but it's exactly what is returned by the answer file command. Maybe I should look into that a bit further.
Pete
Pete
Re: Connecting to a remote sqlite database
Hi Pete,
Please note: you should not look into the oddity of the file path but into the permissions you have when you connect to that directory from a remote client.
Best,
Mark
Please note: you should not look into the oddity of the file path but into the permissions you have when you connect to that directory from a remote client.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode