943,713 Members | Top Members by Rank

Ad:
Jul 16th, 2006
0

foxpro help

Expand Post »
hello ,
is anybody here who help me in foxpro. for following requirement
every week i get a table of some databse from server and i have to modify the structure of that file every time to use that file in some other application ,so i want to make a prg, who ask pls enter your file name for modification ,and that prg autopmatically modify the structure of given dbf table as per default table structure already available there . pls help me , i am in greate trouble,
Last edited by jto; Jul 16th, 2006 at 10:27 am.
Similar Threads
jto
Reputation Points: 13
Solved Threads: 0
Junior Poster in Training
jto is offline Offline
51 posts
since Oct 2005
Jul 27th, 2006
0

Re: foxpro help

Quote originally posted by jto ...
hello ,
is anybody here who help me in foxpro. for following requirement
every week i get a table of some databse from server and i have to modify the structure of that file every time to use that file in some other application ,so i want to make a prg, who ask pls enter your file name for modification ,and that prg autopmatically modify the structure of given dbf table as per default table structure already available there . pls help me , i am in greate trouble,
dear jto

I am attaching the code below. ceate suitable prg file, which may solve your problem.

here it will ask you to select the .dbf file from any location. (other then .dbf is not allowed at present). The give new file name.

It should have 8 character at present.

the new file of structure same as earlier file will be genereated.

so use it and let me know at deardevang@hotmail.com

you can ask any query for foxpro

best luck

devang desai



*------------------------program developed by devang desai 27 august 2006 ----------------------*
set talk off
clea
close all
store space(200) to m_path
store space(11) to m_newfile
store space(200) to mcomm0,mcomm1,mcomm2
defi popu p_india from 10,0 to 40,40 promp files like *.dbf font "arial",12
on selec popu p_india deact popup p_india

@2,0 say "program to create the new blank file from existing database file" font "arial", 16
@22,60 say "Program developed by :" font "arial", 20 colo r+/n
@25,60 say "Devang Desai - India" font "arial", 20 colo w+/n
@28,60 say "deardevang@hotmail.com" font "arial", 20 colo g+/n

@6,0 say "select the file from the menu to create the new file" font "arial", 16
acti popu p_india
m_path = prompt()
if empty(allt(m_path))
wait wind "nothing selected"
close all
return
endif
@8,0 say "Selected file : " + allt(m_path) font "arial", 16
@11,0 say "Give valid new file name (with out extension): " font "arial", 16
@11,90 get m_newfile pict "!!!!!!!!" font "arial", 16
read

if empty(allt(m_newfile)) = .f.
m_newfile = allt(m_newfile)+ ".dbf"
mcomm0 = " use "+ allt(m_path)
mcomm1 = "copy structure to " + m_newfile
select 1
&mcomm0
&mcomm1
if file(m_newfile)
@20,0 say "File created sucessfully...." font "arial", 20 colo w+/n
select 2
use &m_newfile
brow
else
@20,0 say "File can not be created..." font "arial", 20 colo r+/n
endif
endif

return

*----------------------end of program -----------------------------*
Reputation Points: 10
Solved Threads: 0
Newbie Poster
DEARDEVANG is offline Offline
1 posts
since Jul 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS Access and FileMaker Pro Forum Timeline: Difference between 2 dates by month
Next Thread in MS Access and FileMaker Pro Forum Timeline: Search Code Question





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC