viking2020
Programmer
Hello all
I am new to foxpro. I am a having problem opening databases in visual foxpro.I want class B to open up all my tables(using use command) so that i can use the tables in other classes (by using select command). I see that the tables opened using USE command are restricted to the current class (When i try opening comp table in Class A it gives an error saying alias not found).I would great if someone could tell me how to use the open tables in other classes.
* Example code
* A.prg
DEFINE A as Custom
proc method1()
SET PROCEDURE TO B.prg
DO B
objB = createobject("B"
objB.method2()
select comp && Gives an error saying 'Alias comp not found'
endproc
enddefine
* B.prg
DEFINE B as Custom
proc method2()
USE comp
endproc
enddefine
Thanks
Balaji
I am new to foxpro. I am a having problem opening databases in visual foxpro.I want class B to open up all my tables(using use command) so that i can use the tables in other classes (by using select command). I see that the tables opened using USE command are restricted to the current class (When i try opening comp table in Class A it gives an error saying alias not found).I would great if someone could tell me how to use the open tables in other classes.
* Example code
* A.prg
DEFINE A as Custom
proc method1()
SET PROCEDURE TO B.prg
DO B
objB = createobject("B"
objB.method2()
select comp && Gives an error saying 'Alias comp not found'
endproc
enddefine
* B.prg
DEFINE B as Custom
proc method2()
USE comp
endproc
enddefine
Thanks
Balaji