Hi All,

I have come across a problem with a routine we use that "installs" our
database.

Basically the procedure uses the output from gendbc to modify or set up the
database. In broad terms the procedure:-

1. Determines where the database is located (Held in the registry).
2. Backs up the database to a backup folder
3. Destroys the database
4. Creates a new empty database
5. Appends the data from the backup into the new database.

The problems I have found appear to originate with Vista's file system
security enhancements. The main issue is with:-

if File(thisform.db_location+"\Mydb.dbc") && Under vista is the database
is on my server. This says the file does not exist
&& A database exists so this is an upgrade
Back up data etc
else
&& No database so just create an empty one
endif

I have changed all the permissions on the folder on the server etc but to no
avail. The exact same code works under xp.

Also, the code will work under vista if run from the ide.

In an attempt to solve the problem I have used the drivetype command to
determine if the drive is local or a network share. This command

DRIVETYPE(JUSTDRIVE(FULLPATH(thisform.DB_LOCATION)))
returns
1 (unknown drive type) under vista
and 4 (network share) under XP

Furthermore, the procedure works fine in Vista if the database is located on
a local drive (IDE & compiled)

The server runs Windows 2003 SBS.

Any help greatly appreciated

Rgds
Jan B

Re: Vista VFP9 SP2 File() problem by Jan

Jan
Mon Jul 02 02:34:05 CDT 2007

Sorry Guys, Some bad word wrapping in the original post.

I have come across a problem with a routine we use that "installs" our
database.

Basically the procedure uses the output from gendbc to modify or set up the
database. In broad terms the procedure:-

1. Determines where the database is located (Held in the registry).
2. Backs up the database to a backup folder
3. Destroys the database
4. Creates a new empty database
5. Appends the data from the backup into the new database.

The problems I have found appear to originate with Vista's file system
security enhancements. The main issue is with:-

* Under vista with the database is on my server this says the file does not
exist
if File(thisform.db_location+"\Mydb.dbc")
&& A database exists so this is an upgrade
Back up data etc
else
&& No database so just create an empty one
endif

I have changed all the permissions on the folder on the server etc but to no
avail. The exact same code works under xp.

Also, the code will work under vista if run from the ide.

In an attempt to solve the problem I have used the drivetype command to
determine if the drive is local or a network share. This command

DRIVETYPE(JUSTDRIVE(FULLPATH(thisform.DB_LOCATION)))
returns
1 (unknown drive type) under vista
and 4 (network share) under XP

Furthermore, the procedure works fine in Vista if the database is located on
a local drive (IDE & compiled)

The server runs Windows 2003 SBS.

Any help greatly appreciated

Rgds
Jan B


Re: Vista VFP9 SP2 File() problem by Villi

Villi
Mon Jul 02 03:47:47 CDT 2007

Jan wrote:

> * Under vista with the database is on my server this says the file
> does not exist
> if File(thisform.db_location+"\Mydb.dbc")
> && A database exists so this is an upgrade
> Back up data etc
> else
> && No database so just create an empty one
> endif
>
> I have changed all the permissions on the folder on the server etc
> but to no avail. The exact same code works under xp.


Yes, sounds as an effect of Vista's file system Virtualization, and maybe
registry virtualization, too.
If I were in you, I'd check Calvin Hsia's webpage.
Here's also a link I took from his webpage, the part from page 18 up talks
about virtualization.
http://download.microsoft.com/download/5/6/a/56a0ed11-e073-42f9-932b-38acd478f46d/WindowsVistaUACDevReqs.doc#DSDOC_BKMK_RedesignInstaller3bbc4962_40a

Calvin's webpage:
http://blogs.msdn.com/calvin_hsia/archive/2007/04/13/add-a-manifest-to-control-your-application-vista-uac-behavior.aspx
--
News Microsoft