Help! update database from ver 3 to ver 5 via exe? 
Author Message
 Help! update database from ver 3 to ver 5 via exe?

Help please.

I am trying to distribute an application update but can't get the existing
data when an exe is distributed.

The original application is VFP version 3.0 executable with referential
integrity in the data base.

My new version is VFP version 5.0 with service pack 3, also using
referential integrity. The setup disk set includes an 'Update' program run
after installation. The Update program has to get the version 3.0 data
records into version 5.0 tables.

I copy the old data base to a new directory for safety then use genDBC,
created by vfp to create the new data base and tables.  Then use 'APPEND
FROM' to get the old data into the new tables.

If the Update is run within VFP everything works fine. When Update.EXE is
run I get error messages that the original data base was compiled under an
earlier version. If the Update program does a DELETE DATABASE on the old
tables I still get the 'compiled under an earlier version message.

I presume what is happening is that the 'CONVERT.APP' is being used when the
update is run within VFP but is not available to the executable.

What am I missing? Or did ms make it impossible to have an executable update
a data base?

Thanks for fast replies, I'm under the gun.

Albert



Fri, 01 Sep 2000 03:00:00 GMT  
 Help! update database from ver 3 to ver 5 via exe?

Hello albert,

    I have experimented the same trouble. The only way that i know to solve
the problem is to de-reference the 3.0 table from its database container,
then execute the APPEND command into the new table. More, i needed to create
first a temporary copy of the new database, then attach the table to import
at the new structure, so that the extended options of the table (long names,
field alias, default values etc...) were not lost.

So, my import program looks like this:

PARAMETER tcSourcefile

 i=AttachTable (tcSourceFile, lcnouveaulien)
  lcolderr = ON("ERROR")
 ON ERROR linberr = linberr + 1
 SELECT 0
 lcAlias = SYS(2015)
 USE (tcSourcefile) AGAIN ALIAS (lcAlias)
 litotal = Reccount()
 SCAN FOR NOT DELETED()
    WAIT WINDOW "Enreg N " + STR(RECNO()) + " / " + ALLT(STR(litotal))
NOWAIT
    SCATTER MEMO NAME locurrentrecord
    SELECT (lcdesttable)
    GATHER NAME locurrentrecord
    SELECT(lcalias)
 ENDSCAN

    The two functions, AttachTable and Detach table respectively create the
link from the table to a database container and removes it. To implement
these functions, i used low level file functions, writing the link at the
correct offset into the DBF header. Why did i do that, i don't remember, but
i don't want to change, because it works. I think howevever that it is
better to implement this using FREE TABLE and ADD TABLE commands.

    I hope that this will help you. I know that it's not very simple...

    Fred.

   Fred PAVLIN, EYRA software development France

Albert Doe a crit dans le message ...

Quote:
>Help please.

>I am trying to distribute an application update but can't get the existing
>data when an exe is distributed.

>The original application is VFP version 3.0 executable with referential
>integrity in the data base...



Sat, 02 Sep 2000 03:00:00 GMT  
 Help! update database from ver 3 to ver 5 via exe?

(As i don't see my reply inside the newsgroup, i post it again. Sorry if
it's duplicate)

Hello albert,
    I have experimented the same trouble. The only way that i know to solve
the problem is to de-reference the 3.0 table from its database container,
then execute the APPEND command into the new table. More, i needed to create
first a temporary copy of the new database, then attach the table to import
at the new structure, so that the extended options of the table (long names,
field alias, default values etc...) were not lost.
So, my import program looks like this:
PARAMETER tcSourcefile

i=AttachTable (tcSourceFile, lcnouveaulien)
  lcolderr = ON("ERROR")
ON ERROR linberr = linberr + 1
SELECT 0
lcAlias = SYS(2015)
USE (tcSourcefile) AGAIN ALIAS (lcAlias)
litotal = Reccount()
SCAN FOR NOT DELETED()
    WAIT WINDOW "Enreg N " + STR(RECNO()) + " / " + ALLT(STR(litotal))
NOWAIT
    SCATTER MEMO NAME locurrentrecord
    SELECT (lcdesttable)
    GATHER NAME locurrentrecord
    SELECT(lcalias)
ENDSCAN

    The two functions, AttachTable and Detach table respectively create the
link from the table to a database container and removes it. To implement
these functions, i used low level file functions, writing the link at the
correct offset into the DBF header. Why did i do that, i don't remember, but
i don't want to change, because it works. I think howevever that it is
better to implement this using FREE TABLE and ADD TABLE commands.

    I hope that this will help you. I know that it's not very simple...
    Fred.
   Fred PAVLIN, EYRA software development France

Albert Doe a crit dans le message ...

Quote:
>Help please.

>I am trying to distribute an application update but can't get the existing
>data when an exe is distributed.

>The original application is VFP version 3.0 executable with referential
>integrity in the data base...



Tue, 05 Sep 2000 03:00:00 GMT  
 Help! update database from ver 3 to ver 5 via exe?

Hi Fred,

    Sorry to take so long to reply. You definetely have the solution for me.
The key was to FREE TABLE.

    I used Free table and put up with the problem of truncated field names
by scanning the old table and INSERT INTO the new table using truncated
field names.

Thanks Albert.



Quote:
>(As i don't see my reply inside the newsgroup, i post it again. Sorry if
>it's duplicate)

>Hello albert,
>    I have experimented the same trouble. The only way that i know to solve
>the problem is to de-reference the 3.0 table from its database container,
>then execute the APPEND command into the new table. More, i needed to
create
>first a temporary copy of the new database, then attach the table to import
>at the new structure, so that the extended options of the table (long
names,
>field alias, default values etc...) were not lost.
>So, my import program looks like this:
>PARAMETER tcSourcefile

>i=AttachTable (tcSourceFile, lcnouveaulien)
>  lcolderr = ON("ERROR")
>ON ERROR linberr = linberr + 1
>SELECT 0
>lcAlias = SYS(2015)
>USE (tcSourcefile) AGAIN ALIAS (lcAlias)
>litotal = Reccount()
>SCAN FOR NOT DELETED()
>    WAIT WINDOW "Enreg N " + STR(RECNO()) + " / " + ALLT(STR(litotal))
>NOWAIT
>    SCATTER MEMO NAME locurrentrecord
>    SELECT (lcdesttable)
>    GATHER NAME locurrentrecord
>    SELECT(lcalias)
>ENDSCAN

>    The two functions, AttachTable and Detach table respectively create the
>link from the table to a database container and removes it. To implement
>these functions, i used low level file functions, writing the link at the
>correct offset into the DBF header. Why did i do that, i don't remember,
but
>i don't want to change, because it works. I think howevever that it is
>better to implement this using FREE TABLE and ADD TABLE commands.

>    I hope that this will help you. I know that it's not very simple...
>    Fred.
>   Fred PAVLIN, EYRA software development France

>Albert Doe a crit dans le message ...
>>Help please.

>>I am trying to distribute an application update but can't get the existing
>>data when an exe is distributed.

>>The original application is VFP version 3.0 executable with referential
>>integrity in the data base...



Tue, 05 Sep 2000 03:00:00 GMT  
 Help! update database from ver 3 to ver 5 via exe?

Had the same problem - accountants all over the US used a program I updated and
Microsoft support, after a great deal of hemming and hawing, admitted that there
was no way they knew to do this(programmically)  without users seeing a
messagebox asking them what version of windows they were going to use it with.

Very annoying and unprofessional of Microsoft to not have a program or patch
that would allow this to be done cleanly through a program. They were nice
enough to charge my company for a support call for this information....



Sat, 09 Sep 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Database Ver 5 to Ver 3

2. FOXpro Ver 2.5 for Windows, Prof ver: New

3. Report Writer Ver 8.0 to Ver 10.0

4. Telemagic UK ver update for foxpro

5. Help need disk 2 of ver 2.6 distribution kit

6. HELP with 2 Questions on ver 2.6Win

7. Help we need disk2 of ver 2.6 distribution kit

8. Help with FPW2600.ESL ver 2.6

9. Deactivate Window (Ver 2.6): Please help

10. Deactivate Window (Ver 2.6): Please help

11. Reasons to convince a customer to upgrade from Ver 5 runtime to Ver 7 Runtime.

12. Poosible problem running a ver 6 app in ver 5?

 

 
Powered by phpBB® Forum Software