Please support our MS Access and FileMaker Pro advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Oct 2005
Posts: 51
Reputation: jto is an unknown quantity at this point 
Solved Threads: 0
jto jto is offline Offline
Junior Poster in Training

foxpro help

 
0
  #1
Jul 16th, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1
Reputation: DEARDEVANG is an unknown quantity at this point 
Solved Threads: 0
DEARDEVANG's Avatar
DEARDEVANG DEARDEVANG is offline Offline
Newbie Poster

Re: foxpro help

 
0
  #2
Jul 27th, 2006
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 -----------------------------*
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC