Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTC Navigation Bars

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello. I'm having a problem getting my DTC nav bar to work correctly. The first time I click the Next button, it moves to the next record; however, after that it continues to bring up that same record.

Any ideas are appreciated.

Thanks,
Rene
 
Recordsets usuall navigate via a bookmark. If the table / query has a unique index, then this is sometimes used. Failing this, the whole recordset is used as a 'bookmark'.

If there is no identifying feature in a recordset row, then it is possible for it to continually find the same row - it is not smart enough to know any different.

Alternatively, your page code is changing the 'current row' in some way.

** Try turning on the Trace feature (see top of your asp code). (Content Management)
 
Hi Merlin. Thanks for the response. Can you explain to me some more about the Trace feature? I looked for it, but couldn't find it.

Thanks,
Rene
 
When you use the Script Object Model for an ASP page, which you would need for most DTCs, it adds the following code to your page:

<%@ Language=VBScript %>
<SCRIPT id=&quot;DebugDirectives&quot; runat=&quot;server&quot; language=&quot;javascript&quot;>
// Set these to true to enable debugging or tracing
@set @debug=false
@set @trace=false
</SCRIPT>

The debug flag is rarely useful. But turn on the trace flag:
@set @trace=true

and then view the page! You can add your own trace messages if you wish:

@if (@trace_events)
thisPage._traceEvent('object/file name','event_name');
@end

or

@if (@trace_warnings)
thisPage._traceWarning('message','filname.asp','method name');
@end


In VBScript you cannot call methods starting with an underscore character (_traceEvent or _traceWarnings). So you will have to put your trace calls in JScript instead.

I have altered the trace code in PM.ASP to print the time - which can be useful when some pages seem to 'stall'...

var m_pmTraceTime = new Date;

function _SOM__traceEvent(strObject,strEvent)
{
if (this._trace_on)
{
var dtNow = new Date(); //add time to trace
output = '<br><font color=blue><b>EVENT TRACE: </b> </font>';
output += '<b>' + strObject + '</b> fired <b>' + strEvent + '</b> event. '
output += dtNow.toLocaleString();
var iTimeDiff = Math.round((dtNow.getTime() - m_pmTraceTime.getTime())/1000);
if (iTimeDiff > 0)
output += ' <b>+' + iTimeDiff + '</b>';

Response.Write(output);
m_pmTraceTime = dtNow;
}
}
(Content Management)
 
Thanks for the explanation on Trace. I have begun using it, and it's definetly helping.


Rene
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top