administrator access uac for my app?

Hi all.
It seems that every app I create that uses sqlite for data storage comes up with the same problem at runtime: administrator access is required to save to the database.

Is there a way I can get around this? It’s really annoying, and google hasn’t been much help. Any assistance would be greatly appreciated.

What is the path to the database file?

I’m sure it depends on the path where you or the user wants to store the sqlite database.

Peter was faster…

the db file is in the same folder as the exe.

I would suggest to use something like this:

SpecialFolder.ApplicationData.child("Appfolder").Child("app.sqlite")

Thanks, Michael. I’ll give that a try.
Meanwhile, is there another way as well? If possible, I’d like to try and keep my apps portable.
Sorry if I’m being a headache.

I’d be interested in this for sure. Can you please either post it here, or PM me?

Thanks!

Thanks, Dave. I have no idea what you’re talking about, but I’m always willing to try. :slight_smile:

The Windows app ResourceTuner allows you to change your EXE to run with Admin rights.

That is your problem. Move the database file to SpecialFolder.ApplicationData and everything will be fine.

Any copy, save or modify in the Program Files(x86) folder has to get administrator approval. Xojo or not.

Placing data files next to the executable is simply not a good idea.

[quote=184895:@Michel Bujardet]That is your problem. Move the database file to SpecialFolder.ApplicationData and everything will be fine.

Any copy, save or modify in the Program Files(x86) folder has to get administrator approval. Xojo or not.

Placing data files next to the executable is simply not a good idea.[/quote]
Thanks for the info, Michel…very much appreciated.

Thanks, David. Googling now. :wink:

Well, Michael’s info corrects the problem for installed apps, and David’s suggestion solves it for portable AND installed apps.
Call me a happy camper…thanks guys!!! :slight_smile:

I’m getting an error in the debugger that says “Parameters are not compatible” using this code:
dim f as FolderItem f = GetFolderItem(SpecialFolder.ApplicationData.child("pae").Child("log.sqlite"))

f = SpecialFolder.ApplicationData.child(“pae”).Child(“log.sqlite”)

SpecialFolder.ApplicationData is a folder object so you don’t need to get it.

[quote=185102:@Wayne Golding]f = SpecialFolder.ApplicationData.child(“pae”).Child(“log.sqlite”)

SpecialFolder.ApplicationData is a folder object so you don’t need to get it.[/quote]
Thanks Wayne! Sometimes I guess I just miss the obvious. :wink: