Error: Unable to open the database file
Ray
ray at linkit.com
Tue Apr 5 19:58:54 EDT 2016
I did read some about the file locking issues so I'll continue to look
into that.
Regarding testing with sqLite3, I'm not sure what to do with it. I
downloaded the pre-compiled binary for Windows 64. It gave me 2 files,
sqlite3.def and sqlite3.dll but I'm not sure what to do with them.
Shell commands from within Livecode don't work. Suggestions?
On 4/5/2016 7:22 PM, Peter Haworth wrote:
> I suppose I should also mention the usual caveat about using sqlite over a
> networked file system, which is that sqlite relies on file system locking
> to preserve data integrity and some networked file systems are buggy in
> that area according to the sqlite website.
>
> On Tue, Apr 5, 2016, 3:57 PM Ray <ray at linkit.com> wrote:
>
>> Peter - thanks for jumping in here. Yes, I can read and write files to
>> this location and, as a matter of fact, I can even do a straight read of
>> the database file on the server and get the same cryptic characters back
>> I get when I read the local copy. I just can't establish a connection
>> to it for the purpose of issuing revDatabase calls.
>>
>> You're right when you say the "unable to open the database file" is not
>> very informative. I get the same message when I try that on an empty
>> path on the server.
>>
>> I'll try your sqLite3 suggestion and let you know how it works.
>>
>> Thanks!
>>
>> On 4/5/2016 6:34 PM, Peter Haworth wrote:
>>> You might want to try opening the database with something other than
>>> Livecode in hope that you will get a more informative error message.
>>> sqlite3 is the official sqlite command line tool. It's distributed
>> with
>>> OSX but not sure if it's included with Windows.
>>>
>>> Are you able to access any other files in the same directory as the
>> sqlite
>>> db?
>>>
>>> On Tue, Apr 5, 2016 at 1:31 PM Ray <ray at linkit.com> wrote:
>>>
>>>> Devin - thanks for the idea but that's not it. I just checked and
>>>> everything on my Windows 8.1 system matches case with the database file
>>>> path on the Linux server. I even tried changing the name of the
>>>> database file to all lower case but that didn't work either. Thanks...
>>>>
>>>> On 4/5/2016 3:38 PM, Devin Asay wrote:
>>>>> Ray,
>>>>>
>>>>> You may have moved your DB file from a system that is not case
>>>> sensitive, like MacOS, to one this is case sensitive, like Linux. Do
>> all of
>>>> your folders and file names have the same exact spelling, including
>> upper
>>>> and lower case letters, as the string in your path variable?
>>>>> Devin
>>>>>
>>>>>
>>>>>> On Apr 5, 2016, at 12:39 PM, Ray <ray at linkit.com> wrote:
>>>>>>
>>>>>> ...one other note. I'm guessing calls to sqLite need drivers. These
>>>> drivers are probably built in to Livecode and the OnRev server which
>> would
>>>> explain why LC's database commands works so well locally and with the
>> OnRev
>>>> based samples.
>>>>>> If this is the problem, does anybody know how I could install these
>>>> drivers on my own server?
>>>>>> On 4/5/2016 1:18 PM, Ray wrote:
>>>>>>> I've never worked with sqLite databases before but it appears I
>> should
>>>> be able to access one on a server pretty much the same as I do locally.
>>>>>>> Here's what I've done:
>>>>>>> put revOpenDatabase("sqLite",localPath) into theDbId
>>>> -- this creates a zero K local database file
>>>>>>> put "CREATE TABLE bugs(Name char(50), Date char(50))" into
>> myQuery
>>>>>>> revExecuteSQL theDbId,myQuery -- the local database file is no 2
>> K
>>>>>>> revCloseDatabase theDbId -- close it or I won't be able to copy
>> it
>>>> to the server
>>>>>>> I then copy the local database file to a remote server and make sure
>>>> all 9 permissions are checked (777).
>>>>>>> I now load the well-tested server path into the variable dbPath and
>>>> try this:
>>>>>>> put revOpenDatabase("sqLite",dbPath) into myResult
>>>>>>>
>>>>>>> but all I get back is:
>>>>>>> Error: Unable to open the database file
>>>>>>>
>>>>>>> Suggestions?
>>>>>> _______________________________________________
>>>>>> use-livecode mailing list
>>>>>> use-livecode at lists.runrev.com
>>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>> Devin Asay
>>>>> Office of Digital Humanities
>>>>> Brigham Young University
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> use-livecode at lists.runrev.com
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list