Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why is rebuilding necessary? what have i done? 1

Status
Not open for further replies.

kennmurrah

Technical User
Jul 2, 2002
13
US
greetings.

i've inherited an application built using vfp 5, and i'm attempting to write my own vfp 7 applications to access the same data.

using the tutorial located at msdn.microsoft.com/vfoxpro/technical/tutorial, i've succeed in accessing and modifying the data (i simply changed the data in a text field) ... then, when i went back to the original application and attempted to use it, i received a message that the original database could not be used ... i chose the option to "attempt to rebuild" it, and it worked ... it now displays data, along with the change i made ...

what did i do wrong? how can i build an application to access this data WITHOUT having to do that?

thanks,

kenn
 
I cannot seem to be able to duplicate your problem. I created a database in VFP5.0 and opened it in VFP7.0 and vice-versa and I don't get an error. There must be something else at play. Do you get the message every time you open the database? Is it the database it's refering to or the foxuser.dbf table the message is refering to?
 
mgagnon:

well, you solved my problem without even knowing it :)

i just tried it again and it works fine ... i have NO idea why it gave that error the first time, but the second it behaved exactly right .... i suppose i should just accept my good fate, but i AM still wondering why it didn't work right the first time, and what changed ... i didn't modify my vfp at all, so ????

anyway, thanks for your help.

kenn
 
well, perhaps i spoke too soon ... i tried it a couple more times and failed ... here is the error message:
------------------------------------------------
THe system database associated with this company cannot be opened. The name of the primary file associated with this database is :

xxx.dbc

Do you want to exit, attempt to rebuild the dtabase, or restore the backup database?
------------------------------------------------

i'm not sure if this is a vfp error message, or one generated by the original vfp5 application ....

any clues, anyone?

thanks,

kenn
 
Kenn,
In VFP 7.0, did you choose to use Database Events? This can make it so VFP 3/5/6 has problems with the DBC (they know nothing about this new feature which adds more information to the DBC).

Rick
 
well, as i said in my initial email, i'm dutifully working my way through the tutorial at msdn.microsoft.com/vfoxpro/technical/tutorial ... so please pardon my ignorance ... i did not explicitly use that option ... would it be the default? how can i do otherwise?

again, forgive my ignorance ... i'll try not to stay this ignorant TOO long :)

kennM

 
Database events are like store procedures. If you modify your database and right-click in the gray part and choose properties, all the events you can use are listed. This was introduced in VFP7.0 and not compatible with VFP3/5/6.
 
okay, i've checked the database properties and see that "set events on" is NOT checked ... is that what you mean? if so, doesn't that mean i've not used database events? then do i have yet another problem instead?

thanks again to everyone.

kenn
 
and if it comes down to a recurring issue of compatibility, should i try to find an old copy of foxpro 6 (thereby eliminating the problem) ??? anyone with a copy to sell?

 
i DO have a licensed copy ... what i DON'T have is a friend with a copy of vfp6 (all my friends ask why the heck i'm using vfp) ...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top