Alaska Software Inc. - Re: CXP Debugger Problem - CXPTest.zip (0/1)
Username: Password:
AuthorTopic: Re: CXP Debugger Problem - CXPTest.zip (0/1)
Andreas Gehrs-Pahl

View the complete thread for this message in:

Re: CXP Debugger Problem - CXPTest.zip (0/1)
on Sun, 04 Sep 2016 15:11:57 -0400
Jonathan,

>>DbeLoad( "DBFDBE",.T.)
>>The error is...
>>Invalid DLL name for DBE in Line 15

The error means that you can't load a DBE twice, and the DBFDBE would 
already be loaded when you debug your page. I don't use CXP, so I can only 
guess here, but as far as I know, there is no need to load (standard) DBEs. 
At least none of the Alaska samples load explicitly a DBE, probably because 
the default DbeSys() procedure from the XppSys() DLL is always included.

If you do need to load a DBE, it should be marked as a global section, so 
it is only executed once during the lifetime of the page. The following 
might work (if I understand the documentation correctly):

<!-- The DBEs are loaded only once -->
<%#code locality="page-global"%>
<%
Procedure DbeSys()
  DbeLoad("DBFDBE", .t.)
  DbeLoad("NTXDBE", .t.)
  DbeBuild("DBFNTX", "DBFDBE", "NTXDBE")
return
%>

<!-- The following is done when the page is loaded -->
<%#code locality="page-load"%>
<%
cAlias := "TEST"
cPath := "\\TP-JDL\CXPTest\"
SET DEFAULT TO (cPath)
dbUseArea(.T., , cAlias,, .T.)
%>

<!-- The rest is done every time the page is shown -->

Additionally (or instead), you could check if the DBEs are already loaded, 
before trying to load them again, using something like the following. But 
keep in mind, the less code is executed, the faster your page will load.

if AScan(DbeList(), "DBFDBE") == 0
  DbeLoad(...)
endif

Hope that helps,

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas@AbsoluteSoftwareLLC.com
web:   http://www.AbsoluteSoftwareLLC.com
[F]:   https://www.facebook.com/AbsoluteSoftwareLLC