Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bizarre change in work area
Message
From
24/05/2007 11:47:07
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Bizarre change in work area
Miscellaneous
Thread ID:
01228230
Message ID:
01228230
Views:
57
Given the following code:
local lcRawTable,lcPermId,lnProgramYear, lcSQL, lcConnectionString, lnHandle

lcPermId = alltrim(companyinfo.PermID)
lnProgramYear = companyinfo.yearproduced
lcRawTable = addbs(fileloc) + "surveys\RawData" + transform(lnProgramYear) + '.dbf'

text to lcConnectionString textmerge noshow pretext 15 
	DRIVER=SQL Server;SERVER=PAG-SQLSERVER;
	UID=DonF;APP=Microsoft Visual FoxPro;
	WSID=TPD284;DATABASE=TRPSurvey;Trusted_Connection=Yes
endtext
	
lnHandle = sqlstringconnect(m.lcConnectionString)

text to lcSQL textmerge noshow pretext 15
	select * 
	from trpsurvey..exported
	where ltrim(rtrim(PermID)) = '<<lcPermID>>' or 
	ltrim(rtrim(batchtrack)) = '<<lcPermID>>'
	order by sequence
endtext	

if sqlexec(m.lnHandle,lcSQL,"crsImport",aCountInfo) < 0
	aerror(laError)
	messagebox(laError[1,2])
endif

sqldisconnect(m.lnHandle)

if aCountInfo(2) = 0	&& Make sure there is new data to import
	messagebox("There are no records to import for this site.",16)
	return
else
	select crsImport
	replace companyinfo.totalsurveys with reccount()
	=tableupdate(.t.,.t.,'companyinfo')
	select crsImport
	browse title "Before import"        && this browse shows crsImport
        browse                              && this browse shows companyinfo
*** more code to follow
endif
Notice the result of the 2 browse commands. How can the work area be changed without any code to change it?
Next
Reply
Map
View

Click here to load this message in the networking platform