Connecting to a remote sqlite database
Posted: Thu Jun 03, 2010 10:00 pm
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
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