Access database in Windows Vista

forum.connectivity (1998-2005) & forum.td.connectivity (2005-2010)
Graham

Access database in Windows Vista

Post by Graham » 18 Aug 2008, 05:02

 Posted by:  Graham 

Can someone offer me some advice please.

I have a very small application that I basically give away. The first time I
have had someone install it on Vista seems to have issues.

My install program installs the application and the database, not to
"c:program files" but to C:\Users\LOW-SPL\AppData\Local\VirtualStore\Program
Files

from here I don't know how it all works, my sql.ini file points to the
original directory where I have the access database, but the data is saved
into the new directory.

What does this all mean?

Graham

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2168
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Access database in Windows Vista

Post by Jeff Luther » 18 Aug 2008, 19:47

 Posted by:  Jeff Luther 

Graham:

"What does this all mean?" - I think in general it means that your appl. is
making assumptions about where it gets installed and saves data out to
whereever 'local' is, that is, without prepending the filename with a full
:\ designation. It's relying on the O/S to make good decisions
about where to keep the data; the O/S is, it's just not what your appl.
assumes.

TD has a lot of choices in getting/assigning drive and path info:
-- couple of SalFile function for Get/SetCurrentDirectory that are useful.

-- the SAL system variable for cmd. line args, strArgArray[], always
contains at strArgArray[0] the full drive/path/filename of the appl. itself.
You can VisStrScanReverse, tor example, to parse out the drive/path of where
your appl. is starting from.

-- the VisDOS functions are also useful for finding out where your appl. is
and for getting envr. strings' info., etc.

Lots of options to allow you to build a complete filename, including path.
Of course, you can always--first time saving data, for example--prompt the
user where s/he want the data files to live, save that info. to the registry
or your own INI file, use Sal to create the directory, etc.

- Jeff
Unify Corp.

Graham

Access database in Windows Vista

Post by Graham » 19 Aug 2008, 00:16

 Posted by:  Graham 

Hi again Jeff,

You led me to the answer again! I use an installer called NSIS and part of
the script code is:
; Set Variables
Section "Set Variables"
StrCpy $INSTDIR "$PROGRAMFILES\Equestrian Scoring Program"
SectionEnd

$PROGRAMFILES is already preset and I'm assuming that Vista has a "Program
Files" directory for each user (you can tell I haven't made the switch to
Vista yet!) making it the local directory for the user that was logged into
the computer at that time. Their error happened when another user logged in
and the program wasn't available to them.

I suppose my answer will be to install the program to a directory that's not
under in Program Files to avoid this.

Thanks again for your help.

While I'm at it, being an in house programmer who now only codes about 4
days a year in total, I've only ever used SQLBase, but for this application
I switched to Access because all Windows machines support it. Trouble is
that Access causes so many headaches. I'm wondering if there is a better
solution for me that can be installed via NSIS as simply as using Access.
Any suggestions?

Graham

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2168
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Access database in Windows Vista

Post by Jeff Luther » 19 Aug 2008, 04:10

 Posted by:  Jeff Luther 

"I'm wondering if there is a better solution for me that can be installed
via NSIS as simply as using Access.
Any suggestions?"

I'm not familiar with any, Graham. There was a little NG traffic here
recently on something called SQLite, but I haven't used it. Here's a link
someone provided: http://www.sqlite.org/

Anyone here have any other suggetions for Graham?

- Jeff

Krzysztof Dorko

Access database in Windows Vista

Post by Krzysztof Dorko » 19 Aug 2008, 15:13

 Posted by:  Krzysztof Dorko 

Hi
I don know it I can help with this problem (do not have vista yet) but there
is something like User Account Control under (I think) user management in
Vista Control Panel. I remember we had some problems with our apps when this
checkbox was not check in. So maybe you case is similar. Check if account
which has a problem has this checkbox check in.

Hth
Kris

Return to “td.connectivity”

Who is online

Users browsing this forum: [Ccbot] and 0 guests