FoxPro/visual foxpro database
Expert: Markish - 9/19/2008
QuestionQUESTION: Respected Sir,
I have stored all the tables and the database in data1 folder
I am opening the tables of database in the form design database environment
Table property cursor database it takes data from data1 folder
But if I want to access data of other company in data2 folder what should I do.
I want to keep the forms reports and query same and access different database
Please advice
ANSWER: Hi Allauddin,
IMHO, if you are using the tables dynamically, I don't prefer Data environment. Instead I open all the tables in a new custom method from Form's load event. Using the variable for source directory. SOmething like
sele 0
mdir=CURDIR()
mfnam=mdir+"\test.dbf"
if !used('test')
USE (mfnam)
endif
So whenever you want to change, just set the variable 'mdir' and call this form's method.
Hope this helps..
Best regards,
Markish
http://markishonline.com
---------- FOLLOW-UP ----------
QUESTION: Hi Markish ,
Thanks for the replay
how can i use tables dynamically in visual foxpro report writer
Please Help me out, I would be very thankful to you
Best regards,
allauddin
AnswerHi Alaudddin,
Sorry for the delay in my response. The same logic applies here. Dump your data to a temperorary table and design the report using that table.
Now in your program, before calling the report, just dump the data to the temporary tables.
You can also achieve the same using aliases.
Hope this helps...
Best regards,
Markish
http://markishonline.com