>to all
>new day, new question. when i developed my forms i used the dataenviroment. the problem i have now is that the 'test' systems (cursorsource)data points to - d:\data - now that i am getting ready to make it 'live' i need to change the references (cursorsource) to - f:\data - is their a way of doing this without removing the readding the tables? i see that the cursor property - cursorsouce - holds this info, but doesnt alow for change. any help is greatly appreciated.
>thank you
>frank
Since you let the form DE handle the opening of tables for you, the path to the DBC is included in the cursor's properties. To understand better, do the following:
use myform.scx
set filter to class='cursor'
locate
edit properties
See the DATABASE property? Just strip that path from the DBC name. I use the following code to do this for me:
set talk off
set deleted on
local lnRetVal, i, j, lcFile, llFound, lcStr, lcPath
local array laFiles(1,2)
cd forms
lnRetVal = adir(laFiles, "*.scx")
for i = 1 to lnRetVal
lcFile = laFiles(i,1)
use (lcFile) excl
locate for "DATABASE" $upper(Properties)
do while !eof()
llFound = .f.
for j = 1 to memlines(properties)
if alltrim(upper(substr(mline(properties, j), 1, 8))) = "DATABASE"
llFound = .t.
exit
endif
next
if llFound
lcStr = mline(properties, j)
lcStr = alltrim(substr(lcStr, 11))
lcPath = justpath(lcStr)
lcPath = addbs(lcPath)
replace next 1 properties with strtran(properties, lcPath, "")
endif
continue
enddo
pack
use
compile form (lcFile)
next
cd ..
Mark McCasland
Midlothian, TX USA