G
Guest
I have a abc.PRG file in visual foxpro 8.0. I can run this file using visual
foxpro environment and it creates a table X.dbf in the same folder where
this program file is and populates some data in the table. I am now using
VB.NET to run this abc.PRG file through VB.net environment. (Equivalent
method to perform same as "DO abc.prg" command in foxpro).
My code for this is as below. This code runs on click of a button in Vb.net.:
Dim Fox As New VisualFoxpro.FoxApplication()
Fox.DefaultFilePath = sFoxproLocation
Fox.DoCmd("Do Abc.prg") 'this inserts some data in
newtable.DBF
Fox.DoCmd("Release All")
Fox.DoCmd("Close All")
Fox.DoCmd("Clear All")
Fox.Quit()
Fox = Nothing
ofrmRep.Visible = False 'This is for displaying the table data in a
crystal report ofrmRep.ShowDialog(iReport)
iReport = 0
All the above works fine. Abc.prg runs well and creates a new table in
foxpro. Now, my VB.NET program has a crystal report that uses this generated
table and displays data from it. I get to see the report good too.all this
for the first time i click the button. Now i close my crystal report.
But when i try and click the button again now, it gives me an error saying
"File access is denied e:\newtable.DBF"
Can someone please help me. Thanks in advance!
foxpro environment and it creates a table X.dbf in the same folder where
this program file is and populates some data in the table. I am now using
VB.NET to run this abc.PRG file through VB.net environment. (Equivalent
method to perform same as "DO abc.prg" command in foxpro).
My code for this is as below. This code runs on click of a button in Vb.net.:
Dim Fox As New VisualFoxpro.FoxApplication()
Fox.DefaultFilePath = sFoxproLocation
Fox.DoCmd("Do Abc.prg") 'this inserts some data in
newtable.DBF
Fox.DoCmd("Release All")
Fox.DoCmd("Close All")
Fox.DoCmd("Clear All")
Fox.Quit()
Fox = Nothing
ofrmRep.Visible = False 'This is for displaying the table data in a
crystal report ofrmRep.ShowDialog(iReport)
iReport = 0
All the above works fine. Abc.prg runs well and creates a new table in
foxpro. Now, my VB.NET program has a crystal report that uses this generated
table and displays data from it. I get to see the report good too.all this
for the first time i click the button. Now i close my crystal report.
But when i try and click the button again now, it gives me an error saying
"File access is denied e:\newtable.DBF"
Can someone please help me. Thanks in advance!