Just nu i M3-nätverket
Jump to content

Visual InterDev 6


ulf2

Recommended Posts

vet nån.....

 

Hej, får följande fel när jag skapar en "test" databas med ett exempel som följde med en formwizard till ovan program;

 

Körningsfel i Microsoft JScript error '800a1391'

 

'RS_RZ1' är odefinierad.

 

/GallerySite/Customers_list.asp, line 149

 

vet nån, hur jag löser detta?

 

// Ulf

Link to comment
Share on other sites

ja visst...

 

är rätt ny, på just Visual Intedev och ASP, jobber med intranet och då mest med layout men vill lära mig mer. tror mig ha hittat den kod del som spökar.

 

<SCRIPT language="JavaScript" RUNAT=Server>

function thisPage_onshow()

{

var bNoData = RS_RZ1._isEmpty();

var sStatus = 'No Data';

if (!bNoData) sStatus = getStringRecordLocation()

lblStatus.setCaption(sStatus);

}

 

function getStringRecordLocation()

{

var totalRecords = RS_RZ1.getCount();

var returnString = 'Record ? of ' + totalRecords;

var currRecord = RS_RZ1.absolutePosition;

 

 

if (Grid_RZ1._objPageNavbar != null Grid_RZ1._objRecordNavbar != null Grid_RZ1.hasPageNumber)

{

if (Grid_RZ1._objPageNavbar != null)

{

//the grid has page navigation turned on

var rec_on_page = Grid_RZ1._objPageNavbar.pageSize;

//check for case that there is not a full page of records

if (0 <= ((currRecord + rec_on_page) - totalRecords)) rec_on_page = totalRecords - currRecord;

 

returnString = 'Records ' + currRecord + '-' + (currRecord + rec_on_page) + ' of ' + totalRecords;

}

if (Grid_RZ1._objRecordNavbar != null)

{

//the recordset has inter-page record navigation(the current row is hilighted)

returnString = 'Record ' + currRecord + ' of ' + totalRecords;

}

}

return returnString;

}

 

</SCRIPT>

 

 

vore jättetacksam hjälp

Link to comment
Share on other sites

Hej igen, ja den koden kommer från Customer_list.asp men det var ju bara en del, chansade på att det var den delen då det där fanns med nått om 'RS_RZ1', lägger nu ut hela koden. detta är gjort med hjälp av en wizard (Data Form Wizard 6.0) och där har jag följd den Guided Tour som följde med.

 

<%@ Language=VBScript%>

 

<% ' VI 6.0 Scripting Object Model Enabled %>

<!--#include file="_ScriptLibrary/pm.asp"-->

<% if StartPageProcessing() Then Response.End() %>

<FORM name=thisForm METHOD=post>

<HTML>

<META name="VI60_DTCScriptingPlatform" content="Server (ASP)">

<META name="DFW_LayoutName" content="Listview Page">

<body>

<TABLE cellPadding=0 cellSpacing=0 border=0>

 

<!-- MAIN OUTER TABLE Row1 -->

<tr height=100><td colspan=2 bgcolor=LightGrey><font size=1>&nbsp</font></td></tr>

<TR>

<td bgcolor=LightGrey width=1></td>

<TD bgcolor=LightGrey><font face="arial" color=midnightblue size=+1><b>Data List</b></font>

<font face="arial" color=midnightblue size=-1><br>

<!--METADATA TYPE="DesignerControl" startspan

<OBJECT classid="clsid:B5F0E460-DC5F-11D0-9846-0000F8027CA0" id=lblStatus style="LEFT: 0px; TOP: 0px">

<PARAM NAME="_ExtentX" VALUE="1508">

<PARAM NAME="_ExtentY" VALUE="450">

<PARAM NAME="id" VALUE="lblStatus">

<PARAM NAME="DataSource" VALUE="">

<PARAM NAME="DataField" VALUE="Status Line">

<PARAM NAME="FontFace" VALUE="">

<PARAM NAME="FontSize" VALUE="">

<PARAM NAME="FontColor" VALUE="">

<PARAM NAME="FontBold" VALUE="0">

<PARAM NAME="FontItalic" VALUE="0">

<PARAM NAME="Visible" VALUE="-1">

<PARAM NAME="FormatAsHTML" VALUE="0">

<PARAM NAME="Platform" VALUE="256">

<PARAM NAME="LocalPath" VALUE=""></OBJECT>

-->

<!--#INCLUDE FILE="_ScriptLibrary/Label.ASP"-->

<SCRIPT LANGUAGE=JavaScript RUNAT=Server>

function _initlblStatus()

{

lblStatus.setCaption('Status Line');

}

function _lblStatus_ctor()

{

CreateLabel('lblStatus', _initlblStatus, null);

}

</script>

<% lblStatus.display %>

 

<!--METADATA TYPE="DesignerControl" endspan-->

</font></TD>

</TR>

<tr height=100><td colspan=2 bgcolor=LightGrey><font size=1>&nbsp</font></td></tr>

 

<!-- MAIN OUTER TABLE Row2 -->

<tr><td colspan=2>

 

<!--METADATA TYPE="DesignerControl" startspan

 

<OBJECT classid="clsid:277FC3F2-E90F-11D0-B767-0000F81E081D" id= Grid_RZ1 >

 

<PARAM NAME="_ExtentX" VALUE="8043">

 

<PARAM NAME="_ExtentY" VALUE="3889">

 

<PARAM NAME="DataConnection" VALUE="">

 

<PARAM NAME="SourceType" VALUE="">

 

<PARAM NAME="Recordset" VALUE="RS_RZ1">

 

<PARAM NAME="CtrlName" VALUE="Grid_RZ1">

 

<PARAM NAME="UseAdvancedOnly" VALUE="0">

 

<PARAM NAME="AdvAddToStyles" VALUE="-1">

 

<PARAM NAME="AdvTableTag" VALUE="">

 

<PARAM NAME="AdvHeaderRowTag" VALUE="">

 

<PARAM NAME="AdvHeaderCellTag" VALUE="">

 

<PARAM NAME="AdvDetailRowTag" VALUE="">

 

<PARAM NAME="AdvDetailCellTag" VALUE="">

 

<PARAM NAME="ScriptLanguage" VALUE="1">

 

<PARAM NAME="ScriptingPlatform" VALUE="2">

 

<PARAM NAME="EnableRowNav" VALUE="0">

 

<PARAM NAME="HiliteColor" VALUE="">

 

<PARAM NAME="RecNavBarHasNextButton" VALUE="-1">

 

<PARAM NAME="RecNavBarHasPrevButton" VALUE="-1">

 

<PARAM NAME="RecNavBarNextText" VALUE=" > ">

 

<PARAM NAME="RecNavBarPrevText" VALUE=" < ">

 

<PARAM NAME="ColumnsNames" VALUE='"=""<a href=Customers_details.asp?CustomerID="" + [CustomerID] + "">"" + [CompanyName] +""</a>""","CustomerID","ContactName","City","Phone"'>

 

<PARAM NAME="columnIndex" VALUE="">

 

<PARAM NAME="displayWidth" VALUE="">

 

<PARAM NAME="Coltype" VALUE="">

 

<PARAM NAME="formated" VALUE="">

 

<PARAM NAME="DisplayName" VALUE=""CompanyName","CustomerID","ContactName","City","Phone"">

 

<PARAM NAME="DetailAlignment" VALUE="">

 

<PARAM NAME="HeaderAlignment" VALUE="">

 

<PARAM NAME="DetailBackColor" VALUE="">

 

<PARAM NAME="HeaderBackColor" VALUE="">

 

<PARAM NAME="HeaderFont" VALUE="">

 

<PARAM NAME="HeaderFontColor" VALUE="">

 

<PARAM NAME="HeaderFontSize" VALUE="">

 

<PARAM NAME="HeaderFontStyle" VALUE="">

 

<PARAM NAME="DetailFont" VALUE="">

 

<PARAM NAME="DetailFontColor" VALUE="">

 

<PARAM NAME="DetailFontSize" VALUE="">

 

<PARAM NAME="DetailFontStyle" VALUE="">

 

<PARAM NAME="ColumnCount" VALUE="5">

 

<PARAM NAME="CurStyle" VALUE="Basic Navy">

 

<PARAM NAME="TitleFont" VALUE="Arial">

 

<PARAM NAME="titleFontSize" VALUE="2">

 

<PARAM NAME="TitleFontColor" VALUE="16777215">

 

<PARAM NAME="TitleBackColor" VALUE="13416">

 

<PARAM NAME="TitleFontStyle" VALUE="1">

 

<PARAM NAME="TitleAlignment" VALUE="0">

 

<PARAM NAME="RowFont" VALUE="Arial">

 

<PARAM NAME="RowFontColor" VALUE="0">

 

<PARAM NAME="RowFontStyle" VALUE="0">

 

<PARAM NAME="RowFontSize" VALUE="2">

 

<PARAM NAME="RowBackColor" VALUE="16777215">

 

<PARAM NAME="RowAlignment" VALUE="0">

 

<PARAM NAME="HighlightColor3D" VALUE="268435455">

 

<PARAM NAME="ShadowColor3D" VALUE="268435455">

 

<PARAM NAME="PageSize" VALUE="10">

 

<PARAM NAME="MoveFirstCaption" VALUE=" < ">

 

<PARAM NAME="MoveLastCaption" VALUE=" > ">

 

<PARAM NAME="MovePrevCaption" VALUE=" << ">

 

<PARAM NAME="MoveNextCaption" VALUE=" >> ">

 

<PARAM NAME="BorderSize" VALUE="1">

 

<PARAM NAME="BorderColor" VALUE="13421772">

 

<PARAM NAME="GridBackColor" VALUE="8421504">

 

<PARAM NAME="AltRowBckgnd" VALUE="12632256">

 

<PARAM NAME="CellSpacing" VALUE="0">

 

<PARAM NAME="WidthSelectionMode" VALUE="1">

 

<PARAM NAME="GridWidth" VALUE="304">

 

<PARAM NAME="EnablePaging" VALUE="True">

 

<PARAM NAME="ShowStatus" VALUE="-1">

 

<PARAM NAME="LocalPath" VALUE="">

 

<PARAM NAME="StyleValue" VALUE="445421">

 

</OBJECT>

 

-->

 

<!-- Runtime text here --><!-- Runtime text here -->

 

<!--METADATA TYPE="DesignerControl" endspan-->

 

 

</TD></TR>

</TABLE>

<br>

 

<!--METADATA TYPE="DesignerControl" startspan

 

<OBJECT classid="clsid:9CF5D7C2-EC10-11D0-9862-0000F8027CA0" id= RS_RZ1 >

 

<PARAM NAME="state" VALUE="(TCCursorType=\q3\s-\sStatic\q,TCCursorLocation=\q3\s-\sUse\sclient-side\scursors\q,TCLockType=\q3\s-\sOptimistic\q,TCCacheSize_Unmatched=\q100\q,TCCommTimeout_Unmatched=\q30\q,CCPrepared=0,CCAllRecords=1,TCNRecords_Unmatched=\q10\q,TCODBCSyntax_Unmatched=\q\q,TCHTargetPlatform=\q\q,TCHTargetBrowser_Unmatched=\qServer\s(ASP)\q,TCTargetPlatform=\qInherit\sfrom\spage\q,RCCache=\qRCBookPage\q,CCOpen=1,GCParameters=(Rows = 0),RCDBObject=\qRCDBObject\q,TCControlID_Unmatched=\qRS_RZ1\q,TCConn=\qConnection1\q,TCDBObject=\qTables\q,TCDBObjectName=\qCustomers\q,TCPPConn=\qConnection1\q,TCPPDBObject=\qTables\q,TCPPDBObjectName=\qCustomers\q,LocalPath=\q\q)"></OBJECT>

 

-->

 

<!-- Runtime text here --><!-- Runtime text here -->

 

<!--METADATA TYPE="DesignerControl" endspan-->

 

 

<SCRIPT language="JavaScript" RUNAT=Server>

function thisPage_onshow()

{

var bNoData = RS_RZ1._isEmpty();

var sStatus = 'No Data';

if (!bNoData) sStatus = getStringRecordLocation()

lblStatus.setCaption(sStatus);

}

 

function getStringRecordLocation()

{

var totalRecords = RS_RZ1.getCount();

var returnString = 'Record ? of ' + totalRecords;

var currRecord = RS_RZ1.absolutePosition;

 

 

if (Grid_RZ1._objPageNavbar != null Grid_RZ1._objRecordNavbar != null Grid_RZ1.hasPageNumber)

{

if (Grid_RZ1._objPageNavbar != null)

{

//the grid has page navigation turned on

var rec_on_page = Grid_RZ1._objPageNavbar.pageSize;

//check for case that there is not a full page of records

if (0 <= ((currRecord + rec_on_page) - totalRecords)) rec_on_page = totalRecords - currRecord;

 

returnString = 'Records ' + currRecord + '-' + (currRecord + rec_on_page) + ' of ' + totalRecords;

}

if (Grid_RZ1._objRecordNavbar != null)

{

//the recordset has inter-page record navigation(the current row is hilighted)

returnString = 'Record ' + currRecord + ' of ' + totalRecords;

}

}

return returnString;

}

 

</SCRIPT>

</BODY>

<% ' VI 6.0 Scripting Object Model Enabled %>

<% EndPageProcessing() %>

</FORM>

</html>

 

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...