Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Sample Data
Message
From
21/06/2003 01:31:32
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00801954
Message ID:
00802543
Views:
23
Hi David,

Thanks for the suggestion on how to go about working with two databases. After I wrote code to handle which database to use, I checked to see if the table is in use before opening it. Here is the code...

cDatabase = ""
IF ALLTRIM(i_DataSet) = "S" && Sample Data
cDataBase = CURDIR() + "Samples\GenData"
ELSE
cDataBase = CURDIR() + "Data\GenData"
ENDIF

OPEN DATABASE (cDataBase)
SET DATABASE TO (cDataBase)

cSysFile = "Temp1.dbf"

IF !FILE(cSysFile)
CREATE TABLE Temp1(Gen_Id I, cType C(30), cName c(80),cSetting c(80))
USE IN Temp1
ENDIF

*Error occurred here
IF !USED("Temp1")
USE Temp1 IN 0
ENDIF

SELECT Temp1
=CURSORSETPROP("Buffering",3,"Temp1")


VFP gave me this error -> Table "Temp1.dbf" is not marked as belonging to "GenData" database. Would you like to create a back link to mark it. If I clicked on "NO", VFP display "Cannot resolved backlink".

Do you know what is going on here? If I clicked on "Yes" to backlink, Would this destroy one of my database? TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform